You are here

function newsletter_token_info in Newsletter 7

Same name and namespace in other branches
  1. 7.2 newsletter.module \newsletter_token_info()

Implements hook_token_info().

File

./newsletter.module, line 577
Defines menu items for newsletter administration, permissions and basic drupal hooks.

Code

function newsletter_token_info() {
  $type = array(
    'name' => t('Newsletter'),
    'description' => t('Tokens related to newsletters.'),
    'needs-data' => 'newsletter',
  );
  $newsletter['confirmation_url'] = array(
    'name' => t('Confirmation URL'),
    'description' => t('The url with the generated hash where the subscriber confirms subscription'),
  );
  $newsletter['subscription_ip'] = array(
    'name' => t('Subscription IP'),
    'description' => t('The url with the generated hash where the subscriber confirms subscription'),
  );
  $newsletter['unsubscribe_url'] = array(
    'name' => t('Unsubscribe URL'),
    'description' => t('The URL that unsubscribes the current user from subscribed newsletters'),
  );
  $newsletter['edit_subscription_url'] = array(
    'name' => t('Edit subscription URL'),
    'description' => t('The URL that allows even anonymous users to edit their newlsetter subscription'),
  );
  $newsletter['subscriber_firstname'] = array(
    'name' => t("Subscriber's First Name"),
    'description' => t('You need to have this required in the personal info form, in order to use it efficiently'),
  );
  $newsletter['subscriber_lastname'] = array(
    'name' => t("Subscriber's Last Name"),
    'description' => t('You need to have this required in the personal info form, in order to use it efficiently'),
  );
  $newsletter['subscriber_email'] = array(
    'name' => t("Subscriber's e-mail"),
    'description' => t("Subscriber's e-mail"),
  );
  $newsletter['subscription_time'] = array(
    'name' => t('Subscription Time'),
    'description' => t('The date this subscriber subscribed to your list'),
  );
  $newsletter['list_name'] = array(
    'name' => t('List name'),
    'description' => t('The newsletter list name'),
  );
  $newsletter['list_description'] = array(
    'name' => t("List's description"),
    'description' => t('The newsletter list description'),
  );
  $newsletter['list_category'] = array(
    'name' => t("List's category"),
    'description' => t('The newsletter list category'),
  );
  return array(
    'types' => array(
      'newsletter' => $type,
    ),
    'tokens' => array(
      'newsletter' => $newsletter,
    ),
  );
}