function social_mentions_token_info in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.2 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.3 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.4 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.5 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.6 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.7 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 8.8 modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 10.3.x modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 10.0.x modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 10.1.x modules/social_features/social_mentions/social_mentions.tokens.inc \social_mentions_token_info()
- 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 14 - 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.'),
];
return [
'types' => [
'social_mentions' => $type,
],
'tokens' => [
'social_mentions' => $social_mentions,
],
];
}