function quickbar_get_menu_tree in Quickbar 7
Same name and namespace in other branches
- 6 quickbar.module \quickbar_get_menu_tree()
- 7.2 quickbar.module \quickbar_get_menu_tree()
Helper for returning a selectively flattened version of the menu.
1 call to quickbar_get_menu_tree()
- quickbar_menu_tree in ./
quickbar.module - Retrieve a hierarchy of links representing select portions of the menu.
File
- ./
quickbar.module, line 240
Code
function quickbar_get_menu_tree($menu) {
$tree = menu_tree_all_data($menu);
foreach ($tree as $k => $item) {
if ($item['link']['link_path'] == 'admin' && !empty($item['below'])) {
unset($tree[$k]);
$tree = array_merge($tree, $item['below']);
}
}
return $tree;
}