function hook_menu_alter

This hook lets us make alterations to menu items before saving them to the database.

It is only called when the menu cache is cleared and being rebuilt.

Notice that $items is passed by reference, so you must make changes to the $items array if you want those changes saved, as seen in the xample below.

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.

schools_menu_alter in modules/schools/schools.module
hook_menu_alter

File

includes/hook.api.php, line 1134
Lists all available hooks within FlightPath's core code.

Code

function hook_menu_alter(&$items) {
  foreach ($items as $path => $item) {
    if ($path == 'admin/config/some-path') {
      $items [$path]['access_callback'] = 'new_function_name';
    }
  }
}