You are here

function social_mentions_token_info in Open Social 8.7

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

Implements hook_token_info().

File

modules/social_features/social_mentions/social_mentions.tokens.inc, line 16
Builds placeholder replacement tokens for Social Mentions module.

Code

function social_mentions_token_info() {
  $type = [
    'name' => t('Social Mentions'),
    'description' => t('Tokens from the social mentions module.'),
    'needs-data' => 'profile',
  ];
  $social_mentions['mentioned_user'] = [
    'name' => t('Get the mentioned user'),
    'description' => t('Display the mentioned user in a post'),
  ];
  $social_mentions['user_name'] = [
    'name' => t('User name'),
    'description' => t('First and last name or username, depends on settings.'),
  ];
  $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.'),
  ];
  return [
    'types' => [
      'social_mentions' => $type,
    ],
    'tokens' => [
      'social_mentions' => $social_mentions,
    ],
  ];
}