function theme_heartbeat_time_ago in Heartbeat 7
Same name and namespace in other branches
- 6.4 heartbeat.module \theme_heartbeat_time_ago()
Theme function for the timestamp of a message.
3 theme calls to theme_heartbeat_time_ago()
- heartbeat_comments_tokens in modules/
heartbeat_comments/ heartbeat_comments.module - Implements hook_tokens().
- heartbeat_heartbeat_activity_view in ./
heartbeat.module - Implements hook_heartbeat_activity_view().
- hook_heartbeat_activity_view in ./
heartbeat.api.php - This hook is provided by Heartbeat to prepare content for an activity object.
File
- ./
heartbeat.module, line 1367 - Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.
Code
function theme_heartbeat_time_ago($variables) {
$message = $variables['heartbeat_activity'];
$time_info = '';
if ($message->show_message_times) {
$message_date = _theme_time_ago($message->timestamp);
if ($message->target_count <= 1 || $message->show_message_times_grouped) {
$time_info .= '<span class="heartbeat-time-ago">';
$time_info .= l($message_date, 'heartbeat/message/' . $message->uaid, array(
'html' => TRUE,
));
$time_info .= '</span>';
}
}
return $time_info;
}