function subscriptions_mail_subscriptions_tokens_list in Subscriptions 6
Implementation of hook_subscriptions_tokens_list().
Provide replacable tokens for mail_edit. mail_edit calls only the hook in the module that registered the mailkey, but we call this hook function from there to add some common tokens.
1 call to subscriptions_mail_subscriptions_tokens_list()
- subscriptions_mail_mail_edit_tokens_list in ./
subscriptions_mail.module - Implementation of hook_mail_edit_tokens_list().
File
- ./
subscriptions_mail.module, line 130 - Subscriptions module mail gateway.
Code
function subscriptions_mail_subscriptions_tokens_list($mailkey, $options = array()) {
$tokens = array();
switch ($mailkey) {
case 'digest':
break;
default:
$tokens += array(
'!site' => t('The name of the site.'),
'!recipient_name' => t('The name of the recipient.'),
);
if (module_exists('realname')) {
$tokens += array(
'!recipient_realname' => t('The real name of the recipient (provided by Realname module).'),
);
}
$tokens += array(
'!recipient_page' => t('The user page of the recipient.'),
'!manage_url' => t('The URL where the user can manage her subscriptions.'),
'!recipient_uid' => t('The ID of the recipient.'),
);
}
if (isset($options['tokens'])) {
$tokens += $options['tokens'];
}
return $tokens;
}