theme_comment_block()
drupal/modules/comment/comment.module, line 401
Returns a formatted list of recent comments to be displayed in the comment block.
ingroup themeable
The comment list HTML.
| Name | Description |
|---|---|
| Default theme implementations | Functions and templates that present output to the user, and can be implemented by themes. |
function theme_comment_block() {
$items = array();
$number = variable_get('comment_block_count', 10);
foreach (comment_get_recent($number) as $comment) {
$items[] = l($comment->subject, 'node/' . $comment->nid, array('fragment' => 'comment-' . $comment->cid)) . '<br />' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->timestamp)));
}
if ($items) {
return theme('item_list', $items);
}
}