summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc12
1 files changed, 4 insertions, 8 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index a92481634..e6d96c392 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1317,19 +1317,15 @@ function menu_navigation_links($menu_name, $level = 0) {
$links = array();
foreach ($tree as $item) {
if (!$item['link']['hidden']) {
+ $class = '';
$l = $item['link']['localized_options'];
$l['href'] = $item['link']['href'];
$l['title'] = $item['link']['title'];
if ($item['link']['in_active_trail']) {
- if (empty($l['attributes']['class'])) {
- $l['attributes']['class'] = 'active-trail';
- }
- else {
- $l['attributes']['class'] .= ' active-trail';
- }
+ $class = ' active-trail';
}
- // Keyed with unique menu id to generate classes from theme_links().
- $links['menu-' . $item['link']['mlid']] = $l;
+ // Keyed with the unique mlid to generate classes in theme_links().
+ $links['menu-' . $item['link']['mlid'] . $class] = $l;
}
}
return $links;