You are here

function comment_notify_token_info in Comment Notify 8

Same name and namespace in other branches
  1. 7 comment_notify.tokens.inc \comment_notify_token_info()

Implements hook_token_info().

File

./comment_notify.tokens.inc, line 13
Builds placeholder replacement tokens for comment_notify.module.

Code

function comment_notify_token_info() {

  // Comment tokens.
  $info['tokens']['comment']['unsubscribe-url'] = [
    'name' => t('Unsubscribe URL'),
    'description' => t('The URL to disable notifications for the comment.'),
    'type' => 'url',
  ];

  // Comment subscriber token type (extends the comment token type).
  $info['types']['comment-subscribed'] = [
    'name' => t('Subscribed comment'),
    'description' => t('Tokens related to a comment that is subscribed to new comments.'),
    'type' => 'comment',
  ];
  return $info;
}