You are here

function mailchimp_menu in Mailchimp 5

Same name and namespace in other branches
  1. 5.2 mailchimp.module \mailchimp_menu()
  2. 6.2 mailchimp.module \mailchimp_menu()
  3. 6 mailchimp.module \mailchimp_menu()
  4. 7.5 mailchimp.module \mailchimp_menu()
  5. 7 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()

Implementation of hook_menu.

File

./mailchimp.module, line 196

Code

function mailchimp_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'mailchimp/subscribe',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'mailchimp_subscribe_form',
      ),
      'title' => t('Newsletter Subscription'),
      'type' => MENU_CALLBACK,
      'access' => true,
    );
    $items[] = array(
      'path' => 'mailchimp/reset',
      'callback' => 'mailchimp_reset',
      'type' => MENU_CALLBACK,
      'access' => user_access('administer site configuration'),
    );
    $items[] = array(
      'path' => 'mailchimp/subscribe/message',
      'callback' => 'mailchimp_subscribe_message',
      'title' => t('MailChump Subscription Message'),
      'type' => MENU_CALLBACK,
      'access' => true,
    );
    $items[] = array(
      'path' => 'mailchimp/unsubscribe',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'mailchimp_unsubscribe_form',
      ),
      'title' => t('Newsletter Unsubscribe'),
      'type' => MENU_CALLBACK,
      'access' => true,
    );
    $items[] = array(
      'path' => 'mailchimp/unsubscribe/success',
      'callback' => 'mailchimp_unsubscribe_success',
      'title' => t('Unsubscription Confirmed'),
      'type' => MENU_CALLBACK,
      'access' => true,
    );
    $items[] = array(
      'path' => 'mailchimp/unsubscribe/failure',
      'callback' => 'mailchimp_unsubscribe_failure',
      'title' => t('Unsubscription Failed'),
      'type' => MENU_CALLBACK,
      'access' => true,
    );
    $items[] = array(
      'path' => 'admin/settings/mailchimp',
      'title' => t('MailChimp'),
      'description' => t('Manage MailChimp Settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'mailchimp_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );

    // optional
  }
  return $items;
}