You are here

function notifications_content_token_list in Notifications 5

Same name and namespace in other branches
  1. 6.4 notifications_content/notifications_content.module \notifications_content_token_list()
  2. 6 notifications_content/notifications_content.module \notifications_content_token_list()
  3. 6.2 notifications_content/notifications_content.module \notifications_content_token_list()
  4. 6.3 notifications_content/notifications_content.module \notifications_content_token_list()

Implementation of hook_token_list(). Documents the individual tokens handled by the module.

File

notifications_content/notifications_content.module, line 723
Subscriptions to content events

Code

function notifications_content_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'node' || $type == 'all') {
    $tokens['node']['node-teaser'] = t('The node teaser.');
    $tokens['node']['node-body'] = t('The node body.');
    $tokens['node']['node-url'] = t('The node view url for read more links.');
    $tokens['node']['node-teaser-raw'] = t('Unfiltered node teaser. WARNING - raw user input.');
    $tokens['node']['node-body-raw'] = t('Unfiltered node body. WARNING - raw user input.');
  }
  if ($type == 'comment' || $type == 'all') {
    $tokens['comment']['comment-url'] = t('The comment view url.');
    $tokens['comment']['comment-reply-url'] = t('The comment reply url.');
  }

  // Special case for node type
  if ($type == 'node-type' || $type == 'all') {
    $tokens['node-type']['type-name'] = t('Node type (user-friendly version)');
  }
  return $tokens;
}