diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 1efe91a..d1b5826 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -439,7 +439,7 @@ function _theme($hook, $variables = array()) { $variables['theme_hook_suggestions'] = $suggestions; // For backwards compatibility, pass 'theme_hook_suggestion' on to the // template engine. This is only set when calling a direct suggestion like - // '#theme' => 'menu_tree__shortcut_default' when the template exists in the + // '#theme' => 'menu__shortcut_default' when the template exists in the // current theme. if (isset($theme_hook_suggestion)) { $variables['theme_hook_suggestion'] = $theme_hook_suggestion; @@ -1814,22 +1814,10 @@ function template_preprocess_page(&$variables) { // Pass the main menu and secondary menu to the template as render arrays. if (!empty($variables['main_menu'])) { - $variables['main_menu']['#heading'] = array( - 'text' => t('Main menu'), - 'attributes' => array( - 'id' => 'links__system_main_menu', - 'class' => array('visually-hidden'), - ), - ); + $variables['main_menu']['#prefix'] = ''; } if (!empty($variables['secondary_menu'])) { - $variables['secondary_menu']['#heading'] = array( - 'text' => t('Secondary menu'), - 'attributes' => array( - 'id' => 'links__system_secondary_menu', - 'class' => array('visually-hidden'), - ), - ); + $variables['secondary_menu']['#prefix'] = ''; } if ($node = \Drupal::routeMatch()->getParameter('node')) { diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css index 184b78a..ca8f188 100644 --- a/core/modules/system/css/system.theme.css +++ b/core/modules/system/css/system.theme.css @@ -348,7 +348,7 @@ th.checkbox { } /** - * Markup generated by theme_menu_tree(). + * Markup generated by menu.html.twig. */ ul.menu { list-style: none outside; diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 27f8973..99c3544 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -135,22 +135,13 @@ function bartik_preprocess_block(&$variables) { } /** - * Implements hook_preprocess_HOOK() for menu-tree.html.twig. - * - * @see template_preprocess_menu_tree() + * Implements hook_preprocess_HOOK() for menu.html.twig. */ -function bartik_preprocess_menu_tree(&$variables) { +function bartik_preprocess_menu(&$variables) { $variables['attributes']['class'][] = 'clearfix'; } /** - * Implements THEME_menu_tree__MENUNAME(). - */ -function bartik_menu_tree__shortcut_default($variables) { - return ''; -} - -/** * Implements hook_preprocess_HOOK() for field.html.twig. * * @see template_preprocess_field()