function hook_menu_alter
7.x system.api.php | hook_menu_alter(&$items) |
6.x core.php | hook_menu_alter(&$items) |
Alter the data being saved to the {menu_router} table after hook_menu is invoked.
This hook is invoked by menu_router_build(). The menu definitions are passed in by reference. Each element of the $items array is one item returned by a module from hook_menu. Additional items may be added, or existing items altered.
Parameters
$items: Associative array of menu router definitions returned from hook_menu().
Return value
None.
Related topics
1 function implements hook_menu_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- upload_menu_alter in drupal-6.x/
modules/ upload/ upload.module
1 invocation of hook_menu_alter()
- menu_router_build in drupal-6.x/
includes/ menu.inc - Collect, alter and store the menu definitions.
File
- documentation-6.x/
developer/ hooks/ core.php, line 362 - These are the hooks that are invoked by the Drupal core.
Code
function hook_menu_alter(&$items) {
// Example - disable the page at node/add
$items['node/add']['access callback'] = FALSE;
}