function ctools_comment_render
This function is a somewhat stripped down version of comment_render that removes a bunch of cruft that we both don't need, and makes it difficult to modify this.
1 call to ctools_comment_render()
- ctools_node_comments_content_type_render in plugins/
content_types/ node_context/ node_comments.inc
File
-
plugins/
content_types/ node_context/ node_comments.inc, line 81
Code
function ctools_comment_render($node, $conf) {
$output = '';
if (!user_access('access comments') || !$node->comment) {
return;
}
$mode = $conf['mode'];
$comments_per_page = $conf['comments_per_page'];
$cids = comment_get_thread($node, $mode, $comments_per_page);
$comments = comment_load_multiple($cids);
if ($comments) {
drupal_add_css(drupal_get_path('module', 'comment') . '/comment.css');
comment_prepare_thread($comments);
$build = comment_view_multiple($comments, $node);
$build['pager']['#theme'] = 'pager';
return drupal_render($build);
}
return;
}