function simplenews_menu in Simplenews 6.2
Same name and namespace in other branches
- 5 simplenews.module \simplenews_menu()
- 6 simplenews.module \simplenews_menu()
- 7.2 simplenews.module \simplenews_menu()
- 7 simplenews.module \simplenews_menu()
Implementation of hook_menu().
File
- ./
simplenews.module, line 101 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_menu() {
$items['admin/content/simplenews'] = array(
'title' => 'Newsletters Management',
'description' => 'Manage newsletters and subscriptions.',
'type' => MENU_NORMAL_ITEM,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_news',
),
'access callback' => 'simplenews_newsletter_access',
'file' => 'includes/simplenews.admin.inc',
);
$items['admin/content/simplenews/sent'] = array(
'title' => 'Issues',
'description' => 'List of newsletter issues.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'access callback' => 'user_access',
'access arguments' => array(
'administer newsletters',
),
'weight' => -10,
);
$items['admin/content/simplenews/types'] = array(
'title' => 'Newsletters',
'description' => 'List, add and edit newsletter series.',
'type' => MENU_LOCAL_TASK,
'page callback' => 'simplenews_types_overview',
'access callback' => 'user_access',
'access arguments' => array(
'administer newsletters',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -8,
);
$items['admin/content/simplenews/types/edit/%'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_types_form',
5,
),
'access arguments' => array(
'administer newsletters',
),
'file' => 'includes/simplenews.admin.inc',
);
$items['admin/content/simplenews/types/delete/%'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_types_delete',
5,
),
'access arguments' => array(
'administer newsletters',
),
'file' => 'includes/simplenews.admin.inc',
);
$items['admin/content/simplenews/types/list'] = array(
'title' => 'List newsletters',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/content/simplenews/types/add'] = array(
'title' => 'Add newsletter',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_types_form',
),
'access arguments' => array(
'administer newsletters',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -9,
);
$items['admin/content/simplenews/subscriptions/delete'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscription_multiple_delete_confirm',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.admin.inc',
);
$items['admin/content/simplenews/users'] = array(
'title' => 'Subscriptions',
'description' => 'Newsletter subscription management.',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscription_admin',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -7,
);
$items['admin/content/simplenews/users/edit/%'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscriptions_admin_form',
5,
),
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.subscription.inc',
);
$items['admin/content/simplenews/users/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/content/simplenews/users/import'] = array(
'title' => 'Mass subscribe',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscription_list_add',
),
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -9,
);
$items['admin/content/simplenews/users/export'] = array(
'title' => 'Export',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscription_list_export',
),
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -7,
);
$items['admin/content/simplenews/users/unsubscribe'] = array(
'title' => 'Mass unsubscribe',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscription_list_remove',
),
'access arguments' => array(
'administer simplenews subscriptions',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -8,
);
$items['admin/settings/simplenews'] = array(
'title' => 'Simplenews settings',
'description' => 'Manage simplenews configuration.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_settings',
),
'access arguments' => array(
'administer simplenews settings',
),
'file' => 'includes/simplenews.admin.inc',
);
$items['admin/settings/simplenews/general'] = array(
'title' => 'General',
'description' => 'Simplenews content type and vocabulary settings.',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/settings/simplenews/newsletter'] = array(
'title' => 'Defaults',
'description' => 'Newsletter default settings and sender data.',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_settings_newsletter',
),
'access arguments' => array(
'administer simplenews settings',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -9,
);
$items['admin/settings/simplenews/subscription'] = array(
'title' => 'Subscriptions',
'description' => 'Subscription settings, opt-in/out confirmation email text.',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_settings_subscription',
),
'access arguments' => array(
'administer simplenews settings',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -8,
);
$items['admin/settings/simplenews/mail'] = array(
'title' => 'Send mail',
'description' => 'Send mail, cron and debug options.',
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_admin_settings_mail',
),
'access arguments' => array(
'administer simplenews settings',
),
'file' => 'includes/simplenews.admin.inc',
'weight' => -7,
);
$items['newsletter/confirm'] = array(
'type' => MENU_CALLBACK,
'page callback' => 'simplenews_confirm_subscription',
'access callback' => TRUE,
'file' => 'includes/simplenews.subscription.inc',
);
$items['newsletter/subscriptions'] = array(
'title' => 'Newsletter subscriptions',
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'simplenews_subscriptions_page_form',
),
'access arguments' => array(
'subscribe to newsletters',
),
'file' => 'includes/simplenews.subscription.inc',
);
$items['node/%node/simplenews'] = array(
'title' => 'Newsletter',
'type' => MENU_LOCAL_TASK,
'access callback' => 'simplenews_node_tab_access',
'access arguments' => array(
1,
),
'page callback' => 'simplenews_node_tab_page',
'page arguments' => array(
1,
),
'weight' => 2,
);
return $items;
}