You are here

function theme_heartbeat_messages in Heartbeat 6.4

Theme function for messages

2 theme calls to theme_heartbeat_messages()
heartbeat_activity_poll in ./heartbeat.pages.inc
Callback to poll for newer messages.
theme_heartbeat_list in ./heartbeat.module
Theme function for a list of heartbeat activity messages.

File

./heartbeat.module, line 950

Code

function theme_heartbeat_messages($messages, HeartbeatAccess $heartbeatAccess, $link = '') {
  $content = '';
  foreach ($messages as $key => $message) {
    $message->content['message'] = $message->message;

    //$message->content['widgets'] = theme('heartbeat_widgets', $message);
    $message->content['widgets'] = _theme_heartbeat_widgets($message);
    if ($message->display_time) {
      $message->content['time_info'] = theme('heartbeat_time_ago', $message);
    }
    $message->content['buttons'] = theme('heartbeat_buttons', $message);
    $content .= theme('heartbeat_message_row', $message);

    //$content .= theme('heartbeat_message_row', $message, $time_info, $widgets, $buttons);
  }
  if (!empty($link)) {
    $content .= $link;
  }
  return $content;
}