function menu_block_menu_order_set_menu in Menu Block 7.2
Same name and namespace in other branches
- 7.3 menu_block.module \menu_block_menu_order_set_menu()
Add or remove a menu from the menu_block_menu_order variable.
Parameters
string $menu_name: A menu machine name.
mixed $status: If $status evaluates to TRUE, the menu will be added. If $status evaluates to FALSE, the menu will be removed.
3 calls to menu_block_menu_order_set_menu()
- menu_block_menu_delete in ./
menu_block.module - Implements hook_menu_delete().
- menu_block_menu_insert in ./
menu_block.module - Implements hook_menu_insert().
- menu_block_menu_update in ./
menu_block.module - Implements hook_menu_update().
File
- ./
menu_block.module, line 1046 - Provides configurable blocks of menu items.
Code
function menu_block_menu_order_set_menu($menu_name, $status) {
$menus = variable_get('menu_block_menu_order', array(
'main-menu' => '',
'user-menu' => '',
));
if ($status && !isset($menus[$menu_name])) {
$menus[$menu_name] = '';
variable_set('menu_block_menu_order', $menus);
}
elseif (!$status && isset($menus[$menu_name])) {
unset($menus[$menu_name]);
variable_set('menu_block_menu_order', $menus);
}
}