function node_menu

Implements hook_menu().

File

drupal/core/modules/node/node.module, line 1594
The core module that allows content to be submitted to the site.

Code

function node_menu() {
  $items['admin/content'] = array(
    'title' => 'Content',
    'description' => 'Find and manage content.',
    'page callback' => 'node_admin_nodes',
    'access arguments' => array(
      'access content overview',
    ),
    'weight' => -10,
    'file' => 'node.admin.inc',
  );
  $items['admin/content/node'] = array(
    'title' => 'Content',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/reports/status/rebuild'] = array(
    'title' => 'Rebuild permissions',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_configure_rebuild_confirm',
    ),
    // Any user than can potentially trigger a node_access_needs_rebuild(TRUE)
    // has to be allowed access to the 'node access rebuild' confirm form.
    'access arguments' => array(
      'access administration pages',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'node.admin.inc',
  );
  $items['admin/structure/types'] = array(
    'title' => 'Content types',
    'description' => 'Manage content types, including default status, front page promotion, comment settings, etc.',
    'page callback' => 'node_overview_types',
    'access arguments' => array(
      'administer content types',
    ),
    'file' => 'content_types.inc',
  );
  $items['admin/structure/types/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/structure/types/add'] = array(
    'title' => 'Add content type',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_type_form',
    ),
    'access arguments' => array(
      'administer content types',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'content_types.inc',
  );
  $items['admin/structure/types/manage/%node_type'] = array(
    'title' => 'Edit content type',
    'title callback' => 'node_type_page_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_type_form',
      4,
    ),
    'access arguments' => array(
      'administer content types',
    ),
    'file' => 'content_types.inc',
  );
  $items['admin/structure/types/manage/%node_type/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/structure/types/manage/%node_type/delete'] = array(
    'title' => 'Delete',
    'page arguments' => array(
      'node_type_delete_confirm',
      4,
    ),
    'access arguments' => array(
      'administer content types',
    ),
    'file' => 'content_types.inc',
  );
  $items['node/add'] = array(
    'title' => 'Add content',
    'page callback' => 'node_add_page',
    'access callback' => '_node_add_access',
    'file' => 'node.pages.inc',
  );
  $items['node/add/%node_type'] = array(
    'title callback' => 'node_type_get_clean_name',
    'title arguments' => array(
      2,
    ),
    'page callback' => 'node_add',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'create',
      2,
    ),
    'description callback' => 'node_type_get_description',
    'description arguments' => array(
      2,
    ),
    'file' => 'node.pages.inc',
  );
  $items['node/%node'] = array(
    'title callback' => 'node_page_title',
    'title arguments' => array(
      1,
    ),
    // The page callback also invokes drupal_set_title() in case
    // the menu router's title is overridden by a menu link.
    'page callback' => 'node_page_view',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'view',
      1,
    ),
  );
  $items['node/%node/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['node/%node/edit'] = array(
    'title' => 'Edit',
    'route_name' => 'node_page_edit',
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  );
  $items['node/%node/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_delete_confirm',
      1,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'delete',
      1,
    ),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
    'file' => 'node.pages.inc',
  );
  $items['node/%node/revisions'] = array(
    'title' => 'Revisions',
    'page callback' => 'node_revision_overview',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_node_revision_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 20,
    'type' => MENU_LOCAL_TASK,
    'file' => 'node.pages.inc',
  );
  $items['node/%node/revisions/%node_revision/view'] = array(
    'title' => 'Revisions',
    'page callback' => 'node_show',
    'page arguments' => array(
      3,
      TRUE,
    ),
    'access callback' => '_node_revision_access',
    'access arguments' => array(
      3,
    ),
  );
  $items['node/%node/revisions/%node_revision/revert'] = array(
    'title' => 'Revert to earlier revision',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_revision_revert_confirm',
      3,
    ),
    'access callback' => '_node_revision_access',
    'access arguments' => array(
      3,
      'update',
    ),
    'file' => 'node.pages.inc',
  );
  $items['node/%node/revisions/%node_revision/delete'] = array(
    'title' => 'Delete earlier revision',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'node_revision_delete_confirm',
      3,
    ),
    'access callback' => '_node_revision_access',
    'access arguments' => array(
      3,
      'delete',
    ),
    'file' => 'node.pages.inc',
  );
  return $items;
}