function notifications_token_list in Notifications 6.4
Same name and namespace in other branches
- 5 notifications.module \notifications_token_list()
- 6 notifications.module \notifications_token_list()
- 6.2 notifications.module \notifications_token_list()
- 6.3 notifications.module \notifications_token_list()
Implementation of hook_token_list(). Documents the individual tokens handled by the module.
File
- ./
notifications.module, line 1315 - Notifications module
Code
function notifications_token_list($type = 'all') {
$tokens = array();
if ($type == 'user' || $type == 'all') {
$tokens['user']['subscriptions-manage'] = t('The url for the current user to manage subscriptions.');
$tokens['user']['unsubscribe-url-global'] = t('The url to allow a user to delete all their subscriptions.');
if (module_exists('realname')) {
$tokens['user']['user-realname'] = t('The RealName of the recipient\'s user account.');
}
}
if ($type == 'subscription' || $type == 'all') {
$tokens['subscription']['subscription-unsubscribe-url'] = t('The url for disabling a specific subscription.');
$tokens['subscription']['subscription-edit-url'] = t('The url for editing a specific subscription.');
$tokens['subscription']['subscription-type'] = t('The subscription type.');
$tokens['subscription']['subscription-name'] = t('The subscription name.');
$tokens['subscription']['subscription-description-short'] = t('The subscription short description.');
$tokens['subscription']['subscription-description-long'] = t('The subscription long description.');
}
if ($type == 'event' || $type == 'all') {
$tokens['event']['event-type-description'] = t('Description of event type.');
$tokens['event']['event-date-small'] = t('Date of the event, short format.');
$tokens['event']['event-date-medium'] = t('Date of the event, medium format.');
$tokens['event']['event-date-large'] = t('Date of the event, large format.');
}
if ($type == 'destination' || $type == 'all') {
// Nore destination tokens provided by messaging module
$tokens['destination']['destination-unsubscribe-url'] = t('URL to unsubscribe to the destination.');
$tokens['destination']['destination-manage-url'] = t('URL to manage all subscriptions for the destination.');
$tokens['destination']['destination-edit-url'] = t('URL to edit the destination.');
}
return $tokens;
}