Commit 09697857 authored by webchick's avatar webchick

#357429 by fusedpro: Update the documentation of hook_menu_alter() to use...

#357429 by fusedpro: Update the documentation of hook_menu_alter() to use 'items' rather than 'callbacks' to match hook_menu().
parent 7842c3c1
......@@ -88,18 +88,18 @@ function hook_menu() {
* 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
* 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.
*
* @param $callbacks
* @param $items
* Associative array of menu router definitions returned from hook_menu().
* @return
* None.
*/
function hook_menu_alter(&$callbacks) {
function hook_menu_alter(&$items) {
// Example - disable the page at node/add
$callbacks['node/add']['access callback'] = FALSE;
$items['node/add']['access callback'] = FALSE;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment