1.20.x node.module | node_menu() |
Implements hook_menu().
File
- modules/
node/ node.module, line 1788 - The core module that allows content to be submitted to the site.
Code
function node_menu() {
$items['admin/content/node/delete'] = array(
'title' => 'Confirm content deletion',
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_multiple_delete_confirm'),
'access arguments' => array('access content overview'),
'file' => 'node.admin.inc',
);
$items['admin/reports/status/rebuild'] = array(
'title' => 'Rebuild permissions',
'page callback' => 'backdrop_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, home page promotion, comment settings, etc.',
'page callback' => 'node_overview_types',
'access arguments' => array('administer content types'),
'file' => 'node.types.inc',
);
$items['admin/structure/types/list'] = array(
'title' => 'List content types',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/types/add'] = array(
'title' => 'Add content type',
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_type_form'),
'access arguments' => array('administer content types'),
'type' => MENU_LOCAL_ACTION,
'file' => 'node.types.inc',
);
$items['admin/structure/types/manage/%node_type'] = array(
'title' => 'Configure content type',
'title callback' => 'node_type_page_title',
'title arguments' => array(4),
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_type_form', 4),
'access arguments' => array('administer content types'),
'file' => 'node.types.inc',
);
$items['admin/structure/types/manage/%node_type/configure'] = array(
'title' => 'Configure',
'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'),
'type' => MENU_VISIBLE_IN_BREADCRUMB,
'file' => 'node.types.inc',
);
$items['node'] = array(
'page callback' => 'node_page_default',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['node/add'] = array(
'title' => 'Add content',
'page callback' => 'node_add_page',
'access callback' => '_node_add_access',
'file' => 'node.pages.inc',
'menu_name' => 'management',
'weight' => -20,
);
$items['rss.xml'] = array(
'title' => 'RSS feed',
'page callback' => 'node_feed',
'access arguments' => array('access content'),
// Prevent Layout from affecting our markup by specifying delivery callback.
'delivery callback' => 'backdrop_deliver_html_page',
'type' => MENU_CALLBACK,
// Pass a FALSE and array argument to ensure that additional path components
// are not passed to node_feed().
'page arguments' => array(FALSE, array()),
);
// @todo Remove this loop when we have a 'description callback' property.
// Resets the internal static cache of _node_types_build() and forces a
// rebuild of the node type information.
node_type_cache_reset();
foreach (node_type_get_types() as $type) {
$type_url_str = str_replace('_', '-', $type->type);
$items['node/add/' . $type_url_str] = array(
'title' => $type->name,
'title callback' => 'check_plain',
'page callback' => 'node_add',
'page arguments' => array($type->type),
'access callback' => 'node_access',
'access arguments' => array('create', $type->type),
'description' => $type->description,
'file' => 'node.pages.inc',
);
$items['node/preview/' . $type_url_str . '/%'] = array(
'title' => $type->name,
'title callback' => 'check_plain',
'page callback' => 'node_preview',
'page arguments' => array(3, $type_url_str),
'access callback' => 'node_preview_access',
'access arguments' => array(3),
'description' => $type->description,
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
);
}
$items['node/%node'] = array(
'title callback' => 'node_page_title',
'title arguments' => array(1),
// The page callback also invokes backdrop_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,
'weight' => -10,
);
$items['node/%node/edit'] = array(
'title' => 'Edit',
'page callback' => 'node_page_edit',
'page arguments' => array(1),
'access callback' => 'node_access',
'access arguments' => array('update', 1),
'weight' => 0,
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'file' => 'node.pages.inc',
);
$items['node/%node/delete'] = array(
'title' => 'Delete',
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_delete_confirm', 1),
'access callback' => 'node_access',
'access arguments' => array('delete', 1),
'weight' => 1,
'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' => 2,
'type' => MENU_LOCAL_TASK,
'file' => 'node.pages.inc',
);
$items['node/%node/revisions/%/view'] = array(
'title' => 'Revisions',
'load arguments' => array(3),
'page callback' => 'node_show',
'page arguments' => array(1, TRUE),
'access callback' => '_node_revision_access',
'access arguments' => array(1),
);
$items['node/%node/revisions/%/revert'] = array(
'title' => 'Revert to earlier revision',
'load arguments' => array(3),
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_revision_revert_confirm', 1),
'access callback' => '_node_revision_access',
'access arguments' => array(1, 'update'),
'file' => 'node.pages.inc',
);
$items['node/%node/revisions/%/delete'] = array(
'title' => 'Delete earlier revision',
'load arguments' => array(3),
'page callback' => 'backdrop_get_form',
'page arguments' => array('node_revision_delete_confirm', 1),
'access callback' => '_node_revision_access',
'access arguments' => array(1, 'delete'),
'file' => 'node.pages.inc',
);
$items['node/autocomplete'] = array(
'title' => 'Node autocomplete',
'page callback' => 'node_autocomplete',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
'file' => 'node.pages.inc',
);
return $items;
}