function hook_menu_block_get_sort_menus in Menu Block 7.3
Same name and namespace in other branches
- 6.2 menu_block.api.php \hook_menu_block_get_sort_menus()
- 7.2 menu_block.api.php \hook_menu_block_get_sort_menus()
Return a list of menus to use on menu block's settings form.
Menu block's settings page sorts menus for use with its "the menu selected by the page" option.
Return value
An array containing the menus' machine names as keys with their menu titles as values. The key may optionally be a regular expression to match several menus at a time; see book_menu_block_get_sort_menus() for an example.
1 function implements hook_menu_block_get_sort_menus()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- book_menu_block_get_sort_menus in ./
menu_block.module - Implements hook_menu_block_get_sort_menus() on behalf of book.module.
1 invocation of hook_menu_block_get_sort_menus()
- menu_block_admin_settings_form in ./
menu_block.admin.inc - Menu callback: admin settings form.
File
- ./
menu_block.api.php, line 85 - Hooks provided by the Menu Block module.
Code
function hook_menu_block_get_sort_menus() {
$menus = array();
// For each menu, add the following information:
$menus['menu_name'] = 'menu title';
// Optionally, add a regular expression to match several menus at once.
$menus['/^my\\-menus\\-.+/'] = t('My menus');
return $menus;
}