diff --git a/core/includes/theme.inc b/core/includes/theme.inc index d45c2e5..464c704 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2246,10 +2246,7 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { * * @see system_page_build() */ -function template_preprocess_maintenance_page(&$variables) { - // @todo Rename the templates to page--maintenance + page--install. - template_preprocess_page($variables); - +function template_preprocess_page__maintenance(&$variables) { $page_object = $variables['page']['#page']; $attributes = $page_object->getBodyAttributes(); $classes = $attributes['class']; @@ -2281,11 +2278,9 @@ function template_preprocess_maintenance_page(&$variables) { * An associative array containing: * - content - An array of page content. * - * @see template_preprocess_maintenance_page() + * @see template_preprocess_page__maintenance() */ -function template_preprocess_install_page(&$variables) { - template_preprocess_maintenance_page($variables); - +function template_preprocess_page__maintenance__install(&$variables) { $page_object = $variables['page']['#page']; $attributes = $page_object->getBodyAttributes(); $classes = $attributes['class']; @@ -2588,14 +2583,6 @@ function drupal_common_theme() { 'variables' => array('size' => 1), ), // From theme.maintenance.inc. - 'maintenance_page' => array( - 'render element' => 'page', - 'template' => 'maintenance-page', - ), - 'install_page' => array( - 'render element' => 'page', - 'template' => 'install-page', - ), 'task_list' => array( 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), ), diff --git a/core/lib/Drupal/Core/Page/DefaultHtmlPageRenderer.php b/core/lib/Drupal/Core/Page/DefaultHtmlPageRenderer.php index 4358ead..d6ff5d4 100644 --- a/core/lib/Drupal/Core/Page/DefaultHtmlPageRenderer.php +++ b/core/lib/Drupal/Core/Page/DefaultHtmlPageRenderer.php @@ -72,8 +72,7 @@ public static function renderPage($main, $title = '', $theme = 'maintenance', ar $page = new HtmlPage('', array(), $title); $page_array = array( '#type' => 'page', - // @todo Change into theme suggestions "page__$theme". - '#theme' => $theme . '_page', + '#theme' => 'page__maintenance' . ($theme !== 'maintenance' ? "__$theme" : ''), '#title' => $title, 'content' => array( 'system_main' => $main, diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/page--maintenance--install.html.twig similarity index 100% rename from core/modules/system/templates/install-page.html.twig rename to core/modules/system/templates/page--maintenance--install.html.twig diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/page--maintenance.html.twig similarity index 100% rename from core/modules/system/templates/maintenance-page.html.twig rename to core/modules/system/templates/page--maintenance.html.twig diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 1532b9f..1758f57 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -91,9 +91,9 @@ function bartik_preprocess_page(&$variables) { } /** - * Implements hook_preprocess_HOOK() for maintenance-page.html.twig. + * Implements hook_preprocess_HOOK(). */ -function bartik_preprocess_maintenance_page(&$variables) { +function bartik_preprocess_page__maintenance(&$variables) { // By default, site_name is set to Drupal if no db connection is available // or during site installation. Setting site_name to an empty string makes // the site and update pages look cleaner. diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/page--maintenance.html.twig similarity index 100% rename from core/themes/bartik/templates/maintenance-page.html.twig rename to core/themes/bartik/templates/page--maintenance.html.twig diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index c3e7a32..c4d7291 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -267,9 +267,9 @@ function seven_element_info_alter(&$type) { } /** - * Implements hook_preprocess_install_page(). + * Implements hook_preprocess_HOOK(). */ -function seven_preprocess_install_page(&$variables) { +function seven_preprocess_page__maintenance__install(&$variables) { $page_object = $variables['page']['#page']; $attributes = $page_object->getHtmlAttributes(); $classes = $attributes['class']; @@ -290,9 +290,9 @@ function seven_preprocess_install_page(&$variables) { } /** - * Implements hook_preprocess_maintenance_page(). + * Implements hook_preprocess_HOOK(). */ -function seven_preprocess_maintenance_page(&$variables) { +function seven_preprocess_page__maintenance(&$variables) { $page_object = $variables['page']['#page']; $attributes = $page_object->getHtmlAttributes(); $classes = $attributes['class']; diff --git a/core/themes/seven/templates/install-page.html.twig b/core/themes/seven/templates/page--maintenance--install.html.twig similarity index 100% rename from core/themes/seven/templates/install-page.html.twig rename to core/themes/seven/templates/page--maintenance--install.html.twig diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/page--maintenance.html.twig similarity index 100% rename from core/themes/seven/templates/maintenance-page.html.twig rename to core/themes/seven/templates/page--maintenance.html.twig