function hs_menu_hierarchical_select_valid_item in Hierarchical Select 5.3
Same name and namespace in other branches
- 6.3 modules/hs_menu.module \hs_menu_hierarchical_select_valid_item()
- 7.3 modules/hs_menu.module \hs_menu_hierarchical_select_valid_item()
Implementation of hook_hierarchical_select_valid_item().
File
- modules/
hs_menu.module, line 165 - Implementation of the Hierarchical Select API for the Menu module.
Code
function hs_menu_hierarchical_select_valid_item($item, $params) {
if (!is_numeric($item) || $item < 1) {
return FALSE;
}
$type = db_result(db_query("SELECT type FROM {menu} WHERE mid = %d", $item));
// mid 1 corresponds to the hardcoded "Navigation" menu.
return $item == 1 || $type & (MENU_MODIFIABLE_BY_ADMIN | MENU_IS_ROOT);
}