function footermap_get_primary_menus in footermap: a footer site map 7
Same name and namespace in other branches
- 5.2 footermap.module \footermap_get_primary_menus()
- 6 footermap.module \footermap_get_primary_menus()
1 call to footermap_get_primary_menus()
File
- ./
footermap.module, line 339
Code
function footermap_get_primary_menus($top_menu) {
$ret = array();
if (!is_numeric($top_menu)) {
return $ret;
}
$query = db_select('menu_links', 'ml');
$query
->fields('ml')
->condition('ml.plid', $top_menu, '=')
->condition('ml.hidden', 0, '=');
$query
->join('menu_custom', 'mc', 'ml.menu_name = mc.menu_name');
$query
->fields('mc');
$res = $query
->execute();
foreach ($res as $menu) {
$ret[$menu->menu_name] = t($menu->title);
}
return $ret;
}