function activity_token_list in Activity 5.3
Same name and namespace in other branches
- 5.4 activity.module \activity_token_list()
- 6.2 activity.module \activity_token_list()
- 6 activity.module \activity_token_list()
Token module integration.
File
- ./
activity.module, line 613 - Activity module: Allow users to see their friends' activity on the site.
Code
function activity_token_list($type = 'all') {
if ($type == 'activity') {
$tokens = array(
'activity' => array(),
);
$tokens['activity'] = array(
'time-small' => t('Date and time in small format: @example', array(
'@example' => format_date(time(), 'small'),
)),
'time-medium' => t('Date and time in medium format: @example', array(
'@example' => format_date(time(), 'medium'),
)),
'time-large' => t('Date and time in large format: @example', array(
'@example' => format_date(time(), 'large'),
)),
'time-ago' => t('How long ago did this happen? Example: %time-ago', array(
'%time-ago' => format_interval(time() - 60 * 60 * 36),
)),
);
return $tokens;
}
}