You are here

function social_like_token_info in Open Social 8.4

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

Implements hook_token_info().

File

modules/social_features/social_like/social_like.tokens.inc, line 17
Builds placeholder replacement tokens for Social Like module.

Code

function social_like_token_info() {
  $type = [
    'name' => t('Social Like'),
    'description' => t('Tokens from the social like module.'),
  ];
  $social_like['liked_entity'] = [
    'name' => t('URL of the liked entity.'),
    'description' => t('URL of the entity the like was created for'),
  ];
  $social_like['liked_content_type'] = [
    'name' => t('The liked content type.'),
    'description' => t('The type of the content that was liked'),
  ];
  $social_like['liked_entity_link_html'] = [
    'name' => t('The (html) link to the liked entity.'),
    'description' => t('The link to the entity, can be post or node, will include raw HTML.'),
  ];
  return [
    'types' => [
      'social_like' => $type,
    ],
    'tokens' => [
      'social_like' => $social_like,
    ],
  ];
}