function theme_activity_comments_comments in Activity 6.2
Same name and namespace in other branches
- 7 activity_comments/activity_comments.module \theme_activity_comments_comments()
Theme up all the comments
2 theme calls to theme_activity_comments_comments()
- activity_comments_form in activity_comments/
activity_comments.module - Add comment form.
- activity_comments_list in activity_comments/
activity_comments.module - List comments menu callback.
File
- activity_comments/
activity_comments.module, line 268 - Provides comment handling for activity messages
Code
function theme_activity_comments_comments($aid, $comments = array(), $limit = 10) {
$items = array();
$count = 0;
foreach ($comments as $comment) {
$hide = ++$count > $limit;
$classes = 'activity-comment-wrapper';
if ($hide) {
$classes .= ' activity-comment-hidden';
}
$items[] = array(
'data' => theme('activity_comments_comment', $comment),
'class' => $classes,
);
}
return theme('item_list', $items, NULL, 'ul', array(
'id' => 'activity_comments-' . $aid,
'class' => 'activity-comment-list',
));
}