diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index 2505e77..510a949 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -6,16 +6,15 @@ */ /** - * Implements hook_custom_theme(). - * - * @todo Add an event subscriber to the Ajax system to automatically set the - * base page theme for all Ajax requests, and then remove this one off. - * See http://drupal.org/node/1954892. + * Implements hook_menu(). */ -function contextual_custom_theme() { - if (substr(current_path(), 0, 11) === 'contextual/') { - return ajax_base_page_theme(); - } +function contextual_menu() { + $items['contextual/render'] = array( + 'route_name' => 'contextual_render', + 'theme callback' => 'ajax_base_page_theme', + ); + + return $items; } /** diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module index 5b11560..a07b824 100644 --- a/core/modules/edit/edit.module +++ b/core/modules/edit/edit.module @@ -16,15 +16,19 @@ use Drupal\Component\Utility\NestedArray; /** - * Implements hook_custom_theme(). - * - * @todo Add an event subscriber to the Ajax system to automatically set the - * base page theme for all Ajax requests, and then remove this one off. + * Implements hook_menu(). */ -function edit_custom_theme() { - if (substr(current_path(), 0, 5) === 'edit/') { - return ajax_base_page_theme(); - } +function edit_menu() { + $items['edit/metadata'] = array( + 'route_name' => 'edit_metadata', + 'theme callback' => 'ajax_base_page_theme', + ); + $items['edit/form/%/%/%/%/%'] = array( + 'route_name' => 'edit_field_form', + 'theme callback' => 'ajax_base_page_theme', + ); + + return $items; } /** diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 0f317b9..2d7991d 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -108,15 +108,15 @@ function editor_library_info() { } /** - * Implements hook_custom_theme(). - * - * @todo Add an event subscriber to the Ajax system to automatically set the - * base page theme for all Ajax requests, and then remove this one off. + * Implements hook_menu(). */ -function editor_custom_theme() { - if (substr(current_path(), 0, 7) === 'editor/') { - return ajax_base_page_theme(); - } +function editor_menu() { + $items['editor/%/%/%/%/%'] = array( + 'route_name' => 'editor_field_untransformed_text', + 'theme callback' => 'ajax_base_page_theme', + ); + + return $items; } /**