Commit b2dbf40c authored by davereid's avatar davereid Committed by Dave Reid

Issue #2194115 by ergophobe, Dave Reid: Simplified setting active-trail class...

Issue #2194115 by ergophobe, Dave Reid: Simplified setting active-trail class in menu_block_get_title().
parent b4280bde
......@@ -476,12 +476,7 @@ function menu_block_get_title($render_title_as_link = TRUE) {
elseif ($render_title_as_link) {
// The tree's title is a menu item with a link.
if (!empty($menu_item['in_active_trail'])) {
if (!empty($menu_item['localized_options']['attributes']['class'])) {
$menu_item['localized_options']['attributes']['class'][] = 'active-trail';
}
else {
$menu_item['localized_options']['attributes']['class'][] = 'active-trail';
}
$menu_item['localized_options']['attributes']['class'][] = 'active-trail';
}
$title = array(
'#type' => 'link',
......
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