function commons_activity_streams_token_info in Drupal Commons 7.3
Implements hook_token_info().
File
- modules/
commons/ commons_activity_streams/ commons_activity_streams.module, line 220
Code
function commons_activity_streams_token_info() {
$tokens = array();
$styles = image_styles();
// Create a token to retrieve the user picture formatted using any of the
// currently defined image styles.
foreach ($styles as $style_name => $style) {
$tokens['picture:' . $style_name] = array(
'name' => t('Picture: @st image style', array(
'@st' => $style_name,
)),
'description' => t('Picture: @st image style', array(
'@st' => $style_name,
)),
);
}
return array(
'tokens' => array(
'user' => $tokens,
),
);
}