You are here

function menu_menu in Drupal 7

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

Implements hook_menu().

File

modules/menu/menu.module, line 59
Allows administrators to customize the site's navigation menus.

Code

function menu_menu() {
  $items['admin/structure/menu'] = array(
    'title' => 'Menus',
    'description' => 'Add new menus to your site, edit existing menus, and rename and reorganize menu links.',
    'page callback' => 'menu_overview_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/parents'] = array(
    'title' => 'Parent menu items',
    'page callback' => 'menu_parent_options_js',
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer menu',
    ),
  );
  $items['admin/structure/menu/list'] = array(
    'title' => 'List menus',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/structure/menu/add'] = array(
    'title' => 'Add menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_edit_menu',
      'add',
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_configure',
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/manage/%menu'] = array(
    'title' => 'Customize menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_overview_form',
      4,
    ),
    'title callback' => 'menu_overview_title',
    'title arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/manage/%menu/list'] = array(
    'title' => 'List links',
    'weight' => -10,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['admin/structure/menu/manage/%menu/add'] = array(
    'title' => 'Add link',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_edit_item',
      'add',
      NULL,
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/manage/%menu/edit'] = array(
    'title' => 'Edit menu',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_edit_menu',
      'edit',
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/manage/%menu/delete'] = array(
    'title' => 'Delete menu',
    'page callback' => 'menu_delete_menu_page',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/item/%menu_link/edit'] = array(
    'title' => 'Edit menu link',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_edit_item',
      'edit',
      4,
      NULL,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/item/%menu_link/reset'] = array(
    'title' => 'Reset menu link',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'menu_reset_item_confirm',
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  $items['admin/structure/menu/item/%menu_link/delete'] = array(
    'title' => 'Delete menu link',
    'page callback' => 'menu_item_delete_page',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer menu',
    ),
    'file' => 'menu.admin.inc',
  );
  return $items;
}