diff --git a/core/includes/menu.inc b/core/includes/menu.inc index b75aa7f..e5310eb 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1579,8 +1579,7 @@ function template_preprocess_menu_tree(&$variables) { function template_preprocess_menu_link(&$variables) { $element = $variables['element']; - // @todo Remove below drupal_render()? - $variables['sub_menu'] = ($element['#below']) ? drupal_render($element['#below']) : array(); + $variables['sub_menu'] = $element['#below']; $variables['link'] = l($element['#title'], $element['#href'], $element['#localized_options']); $variables['wrapper_attributes'] = new Attribute($element['#attributes']); } @@ -2237,15 +2236,16 @@ function theme_menu_local_tasks(&$variables) { } /** - * Preprocess variables for primary and secondary local tasks. + * Prepares variables for primary and secondary local task templates. * - * @param $variables + * Default template: menu-local-tasks.html.twig. + * + * @param array $variables * An associative array containing: * - primary: (optional) An array of local tasks (tabs). * - secondary: (optional) An array of local tasks (tabs). * * @see menu_local_tasks() - * @ingroup themeable */ function template_preprocess_menu_local_tasks(&$variables) { $variables['primary_tasks'] = (!empty($variables['primary'])) ? drupal_render($variables['primary']) : FALSE; diff --git a/core/modules/system/templates/menu-link.html.twig b/core/modules/system/templates/menu-link.html.twig index 9d3146a..66082b2 100644 --- a/core/modules/system/templates/menu-link.html.twig +++ b/core/modules/system/templates/menu-link.html.twig @@ -4,7 +4,7 @@ * Default theme implementation for a menu link and submenu. * * Available variables: - * - wrapper_attributes: An array of HTML attributes for the wrapper element. + * - wrapper_attributes: HTML attributes for the wrapper element. * - link: An HTML string representing the rendered link. * - sub_menu: Rendered list item children of the element. *