hook_menu_alter
Definition
hook_menu_alter(&$callbacks)
developer/hooks/core.php, line 245
Description
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 $callbacks array is one item returned by a module from hook_menu. Additional items may be added, or existing items altered.
Parameters
$callbacks Associative array of menu router definitions returned from hook_menu().
Return value
None.
Related topics
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
Code
<?php
function hook_menu_alter(&$callbacks) {
// Example - disable the page at node/add
$callbacks['node/add']['access callback'] = FALSE;
}
?> 