comment_menu
- Versions
- 4.6 – 5
comment_menu($may_cache)- 6 – 7
comment_menu()
Implement hook_menu().
Code
modules/comment/comment.module, line 150
<?php
function comment_menu() {
$items['admin/content/comment'] = array(
'title' => 'Comments',
'description' => 'List and edit site comments and the comment approval queue.',
'page callback' => 'comment_admin',
'access arguments' => array('administer comments'),
'type' => MENU_LOCAL_TASK,
'file' => 'comment.admin.inc',
);
// Tabs begin here.
$items['admin/content/comment/new'] = array(
'title' => 'Published comments',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/content/comment/approval'] = array(
'title' => 'Unapproved comments',
'title callback' => 'comment_count_unpublished',
'page arguments' => array('approval'),
'access arguments' => array('administer comments'),
'type' => MENU_LOCAL_TASK,
);
$items['comment/%comment'] = array(
'title' => 'Comment permalink',
'page callback' => 'comment_permalink',
'page arguments' => array(1),
'access arguments' => array('access comments'),
'type' => MENU_CALLBACK,
);
$items['comment/%comment/view'] = array(
'title' => 'View comment',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['comment/%comment/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array('comment_form', 1),
'access callback' => 'comment_access',
'access arguments' => array('edit', 1),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 0,
);
$items['comment/%comment/approve'] = array(
'title' => 'Approve',
'page callback' => 'comment_approve',
'page arguments' => array(1),
'access arguments' => array('administer comments'),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'comment.pages.inc',
'weight' => 1,
);
$items['comment/%comment/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array('comment_confirm_delete', 1),
'access arguments' => array('administer comments'),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'file' => 'comment.admin.inc',
'weight' => 2,
);
$items['comment/reply/%node'] = array(
'title' => 'Add new comment',
'page callback' => 'comment_reply',
'page arguments' => array(2),
'access callback' => 'node_access',
'access arguments' => array('view', 2),
'type' => MENU_CALLBACK,
'file' => 'comment.pages.inc',
);
return $items;
}
?>Login or register to post comments 