You are here

function social_comment_token_info in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  2. 8 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  3. 8.2 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  4. 8.3 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  5. 8.4 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  6. 8.5 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  7. 8.6 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  8. 8.7 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  9. 8.8 modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  10. 10.0.x modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  11. 10.1.x modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()
  12. 10.2.x modules/social_features/social_comment/social_comment.tokens.inc \social_comment_token_info()

Implements hook_token_info().

File

modules/social_features/social_comment/social_comment.tokens.inc, line 19
Builds placeholder replacement tokens for Social Comment module.

Code

function social_comment_token_info() {
  $type = [
    'name' => t('Social Comment'),
    'description' => t('Tokens from the social comment module.'),
  ];
  $social_comment['parent_entity_author'] = [
    'name' => t('The author of the parent entity.'),
    'description' => t('The author of the content type that was commented on.'),
  ];
  $social_comment['parent_comment_author'] = [
    'name' => t('The author of the parent comment.'),
    'description' => t('The author of the parent comment.'),
  ];
  $social_comment['parent_comment_date'] = [
    'name' => t('The date of the parent comment.'),
    'description' => t('The date of the parent comment.'),
  ];
  $social_comment['parent_comment_text'] = [
    'name' => t('The text of the parent comment.'),
    'description' => t('The partial text of the parent comment.'),
  ];
  $social_comment['commented_content_type'] = [
    'name' => t('The commented content type.'),
    'description' => t('The type of the content that was commented on.'),
  ];
  $social_mentions['commented_entity_link_html'] = [
    'name' => t('The (html) link to the commented entity.'),
    'description' => t('The link to the commented entity, can be post or node, will include raw HTML.'),
  ];
  $social_comment['comment_author'] = [
    'name' => t('The author of the comment.'),
    'description' => t('The author of the comment.'),
  ];
  $social_comment['comment_date'] = [
    'name' => t('The date of the comment.'),
    'description' => t('The date of the comment.'),
  ];
  $social_comment['comment_text'] = [
    'name' => t('The text of the comment.'),
    'description' => t('The partial text of the comment.'),
  ];
  $social_comment['comment_reply_link_html'] = [
    'name' => t('The (html) link to reply to the comment.'),
    'description' => t('The link (button) to reply to the comment, will include raw HTML.'),
  ];
  return [
    'types' => [
      'social_comment' => $type,
    ],
    'tokens' => [
      'social_comment' => $social_comment,
    ],
  ];
}