function comment_notify_menu in Comment Notify 5.2
Same name and namespace in other branches
- 5 comment_notify.module \comment_notify_menu()
- 6 comment_notify.module \comment_notify_menu()
- 7 comment_notify.module \comment_notify_menu()
Implementation of hook_menu().
File
- ./
comment_notify.module, line 160 - This module provides comment follow-up e-mail notification for anonymous and registered users.
Code
function comment_notify_menu($may_cache) {
$items = array();
global $user;
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/comment_notify',
'title' => t('Comment notify'),
'description' => t('Configure settings for e-mails about new comments.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'comment_notify_settings',
),
'access' => user_access('administer comment notify'),
);
$items[] = array(
'path' => 'admin/settings/comment_notify/settings',
'title' => t('Settings'),
'callback' => 'drupal_get_form',
'description' => t('Configure settings for e-mails about new comments.'),
'callback arguments' => array(
'comment_notify_settings',
),
'access' => user_access('administer comment notify'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/comment_notify/unsubscribe',
'title' => t('Unsubscribe'),
'weight' => 2,
'callback' => 'drupal_get_form',
'description' => t('Unsubscribe an email from all notifications.'),
'callback arguments' => array(
'comment_notify_unsubscribe',
),
'access' => user_access('administer comment notify'),
'type' => MENU_LOCAL_TASK,
);
}
else {
$items[] = array(
'path' => 'comment_notify',
'title' => t('comment notify'),
'callback' => 'comment_notify_page',
'access' => 1,
'type' => MENU_CALLBACK,
);
}
return $items;
}