function _popup_menu in Popup 7
Same name and namespace in other branches
- 8 includes/popup.api.inc \_popup_menu()
- 7.x includes/popup.api.inc \_popup_menu()
- 6.x includes/popup.api.inc \_popup_menu()
File
- includes/
popup.api.inc, line 484
Code
function _popup_menu($attributes) {
module_load_include('inc', 'popup', 'includes/popup.util');
if (!isset($attributes['empty-body'])) {
$attributes['empty-body'] = 'none';
}
$tree = menu_build_tree($attributes['menu']);
$menu = array_pop($tree);
$children = menu_tree_all_data($attributes['menu']);
$menu['below'] = $children ? array_filter(menu_tree_all_data($attributes['menu']), '_popup_menu_visible') : FALSE;
$menu['link']['has_children'] = isset($children);
$menu['link']['title'] = isset($attributes['title']) && strlen($attributes['title']) ? $attributes['title'] : (isset($menu['title']) ? $menu['title'] : 'Menu');
return _popup_menuelement($menu, $attributes);
}