You are here

function sms_token_info in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 sms.tokens.inc \sms_token_info()
  2. 7 sms.tokens.inc \sms_token_info()
  3. 2.1.x sms.tokens.inc \sms_token_info()

Implements hook_token_info().

File

./sms.tokens.inc, line 18
Token callbacks for the sms module.

Code

function sms_token_info() {
  $info['types']['sms'] = [
    'name' => t('SMS'),
    'description' => t("SMS Framework tokens."),
  ];
  $info['tokens']['sms']['verification-url'] = [
    'name' => t("Verification URL"),
    'description' => t("The URL of the site verification page."),
  ];
  $info['types']['sms-message'] = [
    'name' => t('SMS Message'),
    'needs-data' => 'sms-message',
    'description' => t("Tokens for an SMS Message."),
  ];
  $info['tokens']['sms-message']['phone-number'] = [
    'name' => t('Phone number'),
    'description' => t("Recipient phone number"),
  ];
  $info['tokens']['sms-message']['message'] = [
    'name' => t('Message'),
    'description' => t("Contents of the SMS message."),
  ];
  $info['tokens']['sms-message']['verification-code'] = [
    'name' => t("Verification Code"),
    'description' => t("A verification code for a phone number."),
  ];
  return $info;
}