Commit de99844c authored by webchick's avatar webchick
Browse files

#249571 by pwolanin: Fix bug with 'active-trail' class in Primary/Secondary links.

parent 404994e8
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment