diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-08 18:49:03 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-08 18:49:03 +0000 |
commit | 2a19a5c3e115b1c49eed215dbcd30d838686aed0 (patch) | |
tree | 29ae06ac6353658247008e1d91ea1124ed177264 | |
parent | 8ac45b1a7501dd1124b32adfa38f3e87cd15ce93 (diff) | |
download | brdo-2a19a5c3e115b1c49eed215dbcd30d838686aed0.tar.gz brdo-2a19a5c3e115b1c49eed215dbcd30d838686aed0.tar.bz2 |
#180588 by merlinofchaos: run tabs through theme('menu_item_link') compared to just l() directly, so they can be properly themed
-rw-r--r-- | includes/menu.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index e4de16a3a..6d1522c5d 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -923,6 +923,10 @@ function _menu_tree_data($result, $parents, $depth, $previous_element = '') { * Generate the HTML output for a single menu link. */ function theme_menu_item_link($link) { + if (empty($link['options'])) { + $link['options'] = array(); + } + return l($link['title'], $link['href'], $link['options']); } @@ -1135,12 +1139,12 @@ function menu_local_tasks($level = 0, $return_root = FALSE) { if ($item['type'] == MENU_DEFAULT_LOCAL_TASK) { // Find the first parent which is not a default local task. for ($p = $item['tab_parent']; $tasks[$p]['type'] == MENU_DEFAULT_LOCAL_TASK; $p = $tasks[$p]['tab_parent']); - $link = l($item['title'], $tasks[$p]['href']); + $link = theme('menu_item_link', array('title' => $item['title'], 'href' => $tasks[$p]['href'])); $tabs_current .= theme('menu_local_task', $link, TRUE); $next_path = $item['path']; } else { - $link = l($item['title'], $item['href']); + $link = theme('menu_item_link', $item); $tabs_current .= theme('menu_local_task', $link); } } @@ -1167,13 +1171,13 @@ function menu_local_tasks($level = 0, $return_root = FALSE) { if ($item['type'] == MENU_DEFAULT_LOCAL_TASK) { // Find the first parent which is not a default local task. for ($p = $item['tab_parent']; $tasks[$p]['type'] == MENU_DEFAULT_LOCAL_TASK; $p = $tasks[$p]['tab_parent']); - $link = l($item['title'], $tasks[$p]['href']); + $link = theme('menu_item_link', array('title' => $item['title'], 'href' => $tasks[$p]['href'])); if ($item['path'] == $router_item['path']) { $root_path = $tasks[$p]['path']; } } else { - $link = l($item['title'], $item['href']); + $link = theme('menu_item_link', $item); } // We check for the active tab. if ($item['path'] == $path) { |