| 5 comment.module | theme_comment_block() |
| 6 comment.module | theme_comment_block() |
| 7 comment.module | theme_comment_block() |
| 8 comment.module | theme_comment_block() |
Returns a formatted list of recent comments to be displayed in the comment block.
Return value
The comment list HTML.
Related topics
1 theme call to theme_comment_block()
File
- modules/
comment/ comment.module, line 392 - Enables users to comment on published content.
Code
function theme_comment_block() {
$items = array();
foreach (comment_get_recent() as $comment) {
$items[] = l($comment->subject, 'node/' . $comment->nid, array('fragment' => 'comment-' . $comment->cid)) . '<br />' . t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));
}
if ($items) {
return theme('item_list', $items);
}
}
Login or register to post comments