Commit 986c3cdc authored by Dries's avatar Dries
Browse files

- Patch #393632 by andypost: use both first and last class for single-item menu items.

parent 6e947c65
......@@ -809,13 +809,14 @@ function menu_tree_output($tree) {
$num_items = count($items);
foreach ($items as $i => $data) {
$extra_class = NULL;
$extra_class = array();
if ($i == 0) {
$extra_class = 'first';
$extra_class[] = 'first';
}
if ($i == $num_items - 1) {
$extra_class = 'last';
$extra_class[] = 'last';
}
$extra_class = implode(' ', $extra_class);
$link = theme('menu_item_link', $data['link']);
if ($data['below']) {
$output .= theme('menu_item', $link, $data['link']['has_children'], menu_tree_output($data['below']), $data['link']['in_active_trail'], $extra_class);
......
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