You are here

function mailchimp_menu in Mailchimp 7

Same name and namespace in other branches
  1. 5.2 mailchimp.module \mailchimp_menu()
  2. 5 mailchimp.module \mailchimp_menu()
  3. 6.2 mailchimp.module \mailchimp_menu()
  4. 6 mailchimp.module \mailchimp_menu()
  5. 7.5 mailchimp.module \mailchimp_menu()
  6. 7.2 mailchimp.module \mailchimp_menu()
  7. 7.3 mailchimp.module \mailchimp_menu()
  8. 7.4 mailchimp.module \mailchimp_menu()

Implements hook_menu().

File

./mailchimp.module, line 381
Mailchimp module.

Code

function mailchimp_menu() {
  $items = array();
  $items['user/%user/mailchimp'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_subscribe_auth_form',
      1,
    ),
    'title' => 'Newsletter Subscriptions',
    'type' => MENU_LOCAL_TASK,
    'access callback' => 'mailchimp_user_edit_access',
    'access arguments' => array(
      1,
    ),
    'tab_parent' => 'user/%/edit',
  );
  $items['mailchimp/subscribe'] = array(
    'page callback' => 'mailchimp_subscribe_page',
    'title' => 'Newsletter Subscription',
    'type' => MENU_NORMAL_ITEM,
    'access arguments' => array(
      'access content',
    ),
  );
  $items['mailchimp/unsubscribe'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_unsubscribe_form',
    ),
    'title' => 'Newsletter Unsubscribe',
    'type' => MENU_CALLBACK,
    'access callback' => TRUE,
  );
  $items['mailchimp/unsubscribe/success'] = array(
    'page callback' => 'mailchimp_unsubscribe_success',
    'title' => 'Unsubscription Confirmed',
    'type' => MENU_CALLBACK,
    'access callback' => TRUE,
  );
  $items['mailchimp/unsubscribe/failure'] = array(
    'page callback' => 'mailchimp_unsubscribe_failure',
    'title' => 'Unsubscription Failed',
    'type' => MENU_CALLBACK,
    'access callback' => TRUE,
  );
  $items['admin/config/services/mailchimp'] = array(
    'title' => 'MailChimp',
    'description' => 'Manage MailChimp Settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_admin_settings',
    ),
    'access arguments' => array(
      'administer mailchimp',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'mailchimp.admin.inc',
  );
  $items['mailchimp/rebuild'] = array(
    'title' => 'Rebuild Users Table',
    'page callback' => 'mailchimp_rebuild_users',
    'access arguments' => array(
      'administer mailchimp',
    ),
    'weight' => 10,
  );
  return $items;
}