function commons_groups_token_info in Drupal Commons 7.3
Implements of hook_token_info().
File
- modules/
commons/ commons_groups/ commons_groups.module, line 520
Code
function commons_groups_token_info() {
$types = array();
$tokens = array();
// Commons Groups tokens.
$types['commons-groups'] = array(
'name' => t('Commons Groups'),
'description' => t('Tokens related to the Groups functionality in Drupal Commons.'),
'needs-data' => 'node',
);
$tokens['commons-groups']['in-groups-text'] = array(
'name' => t('"In groups" text'),
'description' => t('The text (starting with "in the groups") indicating which groups a piece of content belongs to.'),
);
$tokens['node']['commons-groups-first-group'] = array(
'name' => t('First Group'),
'description' => t('First group associated with a piece of content. Useful for path aliases'),
);
$tokens['node']['commons-groups-group-contributors-count-topics'] = array(
'name' => t('Commons Groups: Group contributor count and topics'),
'description' => t('Displays text showing the number of contributors and the topics associated with a group node.'),
);
return array(
'types' => $types,
'tokens' => $tokens,
);
}