You are here

function menu_menu in Drupal 5

Same name and namespace in other branches
  1. 4 modules/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/menu.module, line 36
Allows administrators to customize the site navigation menu.

Code

function menu_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/build/menu',
      'title' => t('Menus'),
      'description' => t("Control your site's navigation menu, primary links and secondary links. as well as rename and reorganize menu items."),
      'callback' => 'menu_overview',
      'access' => user_access('administer menu'),
    );
    $items[] = array(
      'path' => 'admin/build/menu/list',
      'title' => t('List'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/build/menu/item/add',
      'title' => t('Add menu item'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_edit_item_form',
        'add',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/item/edit',
      'title' => t('Edit menu item'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_edit_item_form',
        'edit',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/item/reset',
      'title' => t('Reset menu item'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_reset_item',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/item/disable',
      'title' => t('Disable menu item'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_confirm_disable_item',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/item/delete',
      'title' => t('Delete menu item'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_item_delete_form',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/menu/add',
      'title' => t('Add menu'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_edit_menu_form',
        'add',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/menu/edit',
      'title' => t('Edit menu'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_edit_menu_form',
        'edit',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/menu/delete',
      'title' => t('Delete menu'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_item_delete_form',
      ),
      'access' => user_access('administer menu'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/menu/settings',
      'title' => t('Settings'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'menu_configure',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 5,
    );
  }
  return $items;
}