function shouts_token_values in Heartbeat 6.4
Implementation of hook_token_values().
File
- modules/
shouts/ shouts.module, line 137 - Gives the possibility to the user to shout a message.
Code
function shouts_token_values($type, $object = NULL, $options = array()) {
$values = array();
switch ($type) {
case 'shout':
// Cast to an object just in case fussy Drupal gave us an array
$shout = (object) $object;
$values['shout-id'] = $shout->shout_id;
$values['shout-actor-avatar'] = l(theme('user_picture', heartbeat_user_load($shout->uid)), 'user/' . $shout->uid, array(
'html' => TRUE,
));
$values['shout-body'] = check_markup($shout->message);
$values['shout-body-raw'] = $shout->message;
$values['shout-author-uid'] = $shout->uid;
$values['shout-date'] = $shout->time;
break;
}
return $values;
}