You are here

function theme_heartbeat_time_ago in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 heartbeat.module \theme_heartbeat_time_ago()

Theme function for the widgets of a message

3 theme calls to theme_heartbeat_time_ago()
heartbeat_activity_poll in ./heartbeat.pages.inc
Callback to poll for newer messages.
theme_heartbeat_messages in ./heartbeat.module
Theme function for messages
_heartbeat_render_view in views/heartbeat_views.module
Helper function to (re-)render the messages from views.

File

./heartbeat.module, line 922

Code

function theme_heartbeat_time_ago($message) {
  $time_info = '';
  $message_date = _theme_time_ago($message->timestamp);
  if ($message->target_count <= 1 || $message->time_info_grouped) {
    $time_info = $message_date;
  }
  return l($time_info, 'heartbeat/message/' . $message->uaid, array(
    'html' => TRUE,
    'attributes' => array(
      'class' => 'underlined',
    ),
    'alias' => TRUE,
  ));
}