function theme_heartbeat_block in Heartbeat 6.2
Same name and namespace in other branches
- 6.4 heartbeat.module \theme_heartbeat_block()
Theme function for blocks
1 theme call to theme_heartbeat_block()
- heartbeat_block in ./
heartbeat.module - Implementation of hook_blocks()
File
- ./
heartbeat.module, line 331 - To fully understand this, you have to be familiar with the rules module. Lots of documentation can be found on http://drupal.org/node/298480 for an introduction and tutorial, but http://drupal.org/node/298486 is a lot of handy info for developers.
Code
function theme_heartbeat_block($messages) {
if (empty($messages)) {
return t('<p>No activity yet</p>');
}
$content = '';
foreach ($messages as $key => $message) {
$content .= '<span class="heartbeat-message-block ' . (($key + 1) % 2 ? 'odd' : 'even') . '">' . $message->message . '</span>';
}
return $content;
}