theme_comment_block

Definition

theme_comment_block()
drupal/modules/comment/comment.module, line 277

Description

Returns a formatted list of recent comments to be displayed in the comment block.

Related topics

Namesort iconDescription
Themeable functionsFunctions that display HTML, and which can be customized by themes.

Code

function theme_comment_block() {
  $items = array();
  foreach (comment_get_recent() as $comment) {
    $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));
  }
  if ($items) {
    return theme('item_list', $items);
  }
}