From 89bf06d25a506e87ca596772aaed09c3f8a9ee61 Mon Sep 17 00:00:00 2001 From: Jen Lampton Date: Mon, 17 Jan 2022 12:48:01 -0800 Subject: [PATCH] Remove the theme_menu_link override. (Moved to subtheme) --- template.php | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/template.php b/template.php index b367efb..2ed0c90 100644 --- a/template.php +++ b/template.php @@ -775,39 +775,6 @@ function borg_menu_tree__user_menu($variables) { return $output; } -/** - * Overrides theme_menu_link(). - */ -function borg_menu_link(array $variables) { - $element = $variables['element']; - $sub_menu = ''; - - if ($element['#below']) { - $sub_menu = backdrop_render($element['#below']); - } - - $menu_name = isset($element['#original_link']['menu_name']) ? $element['#original_link']['menu_name'] : NULL; - if ($menu_name === 'main-menu' || $menu_name === 'menu-handbook') { - // If this is the handbook link and we're on a book page, set an active class. - if ($element['#href'] === 'node/1') { - $node = menu_get_object(); - if (isset($node) && isset($node->type) && $node->type === 'book') { - $element['#attributes']['class'][] = 'active'; - } - } - } - - if ($menu_name === 'main-menu' && ($element['#href'] == 'https://forum.backdropcms.org' || - $element['#href'] == 'https://api.backdropcms.org')) { - $title = check_plain($element['#title']); - $element['#title'] = $title . ' '; - $element['#localized_options']['html'] = TRUE; - } - - $output = l($element['#title'], $element['#href'], $element['#localized_options']); - return '' . $output . $sub_menu . "\n"; -} - /** * Overrides theme_feed_icon(). */