You are here

function menu_menu in Drupal 4

Same name and namespace in other branches
  1. 5 modules/menu/menu.module \menu_menu()
  2. 6 modules/menu/menu.module \menu_menu()
  3. 7 modules/menu/menu.module \menu_menu()

Implementation of hook_menu().

File

modules/menu.module, line 47
Allows administrators to customize the site navigation menu.

Code

function menu_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/menu',
      'title' => t('menus'),
      'callback' => 'menu_overview',
      'access' => user_access('administer menu'),
    );
    $items[] = array(
      'path' => 'admin/menu/list',
      'title' => t('list'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/menu/item/add',
      'title' => t('add menu item'),
      'callback' => 'menu_edit_item_form',
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/menu/item/edit',
      'title' => t('edit menu item'),
      'callback' => 'menu_edit_item_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/menu/item/reset',
      'title' => t('reset menu item'),
      'callback' => 'menu_reset_item',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/menu/item/disable',
      'title' => t('disable menu item'),
      'callback' => 'menu_disable_item',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/menu/item/delete',
      'title' => t('delete menu item'),
      'callback' => 'menu_item_delete_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/menu/menu/add',
      'title' => t('add menu'),
      'callback' => 'menu_edit_menu_form',
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/menu/menu/edit',
      'title' => t('edit menu'),
      'callback' => 'menu_edit_menu_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/menu/menu/delete',
      'title' => t('delete menu'),
      'callback' => 'menu_item_delete_form',
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/menu',
      'title' => t('menus'),
      'callback' => 'menu_configure',
    );
  }
  return $items;
}