You are here

function simplenews_menu in Simplenews 6

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_menu()
  2. 6.2 simplenews.module \simplenews_menu()
  3. 7.2 simplenews.module \simplenews_menu()
  4. 7 simplenews.module \simplenews_menu()

Implementation of hook_menu().

File

./simplenews.module, line 89
Simplnews node handling, sent email, newsletter block and general hooks

Code

function simplenews_menu() {
  $items['admin/content/simplenews'] = array(
    'title' => 'Newsletters',
    'description' => 'Manage newsletters and subscriptions.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'system_admin_menu_block_page',
    'access callback' => 'simplenews_newsletter_access',
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/content/simplenews/sent'] = array(
    'title' => 'Sent issues',
    'description' => 'List of newsletter issues sent and pending.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_news',
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -10,
  );
  $items['admin/content/simplenews/notsent'] = array(
    'title' => 'Draft issues',
    'description' => 'List of newsletter issues not sent.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_news',
      'notsent',
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -9,
  );
  $items['admin/content/simplenews/types'] = array(
    'title' => 'Newsletters',
    'description' => 'List, add and edit newsletter series.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'simplenews_types_overview',
    'access arguments' => array(
      'administer newsletters',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -8,
  );
  $items['admin/content/simplenews/types/edit/%'] = array(
    'title' => 'Newsletters',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_types_form',
      5,
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
    'file' => 'simplenews.admin.inc',
  );
  $items['admin/content/simplenews/types/delete/%'] = array(
    'title' => 'Newsletters',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_types_delete',
      5,
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
    'file' => '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' => 'simplenews.admin.inc',
    'weight' => -9,
  );
  $items['admin/content/simplenews/subscriptions/delete'] = array(
    'title' => 'Delete',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_subscription_multiple_delete_confirm',
    ),
    'access arguments' => array(
      'administer simplenews subscriptions',
    ),
    'file' => 'simplenews.admin.inc',
  );
  $items['admin/content/simplenews/users'] = array(
    'title' => 'Subscriptions',
    'description' => 'Newsletter subscription management.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_subscription_admin',
    ),
    'access arguments' => array(
      'administer simplenews subscriptions',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -7,
  );
  $items['admin/content/simplenews/users/edit/%'] = array(
    'title' => 'Subscriptions',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_users_form',
      5,
    ),
    'access arguments' => array(
      'administer simplenews subscriptions',
    ),
    'file' => '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' => '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' => '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' => 'simplenews.admin.inc',
    'weight' => -8,
  );
  $items['admin/settings/simplenews'] = array(
    'title' => 'Simplenews',
    'description' => 'Manage simplenews configuration.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer simplenews settings',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/settings/simplenews/general'] = array(
    'title' => 'General',
    'description' => 'Simplenews content type and vocabulary settings.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_settings',
    ),
    'access arguments' => array(
      'administer simplenews settings',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -10,
  );
  $items['admin/settings/simplenews/newsletter'] = array(
    'title' => 'Newsletter',
    'description' => 'Newsletter default settings and sender data.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_settings_newsletter',
    ),
    'access arguments' => array(
      'administer simplenews settings',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -9,
  );
  $items['admin/settings/simplenews/subscription'] = array(
    'title' => 'Subscription',
    'description' => 'Subscription settings, opt-in/out confirmation email text.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_settings_subscription',
    ),
    'access arguments' => array(
      'administer simplenews settings',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -8,
  );
  $items['admin/settings/simplenews/mail'] = array(
    'title' => 'Send mail',
    'description' => 'Send mail, cron and debug options.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_admin_settings_mail',
    ),
    'access arguments' => array(
      'administer simplenews settings',
    ),
    'file' => 'simplenews.admin.inc',
    'weight' => -7,
  );
  $items['newsletter/confirm'] = array(
    'title' => 'Confirm newsletter subscriptions',
    'type' => MENU_CALLBACK,
    'page callback' => 'simplenews_confirm_subscription',
    'access arguments' => array(
      'subscribe to newsletters',
    ),
    'file' => 'simplenews.subscription.inc',
  );
  $items['newsletter/subscriptions'] = array(
    'title' => 'Manage newsletter subscriptions',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_subscription_manager_form',
    ),
    'access arguments' => array(
      'subscribe to newsletters',
    ),
    'file' => 'simplenews.subscription.inc',
  );
  return $items;
}