function ctools_comment_reply_form_content_type_render

1 string reference to 'ctools_comment_reply_form_content_type_render'
comment_reply_form.inc in plugins/content_types/comment/comment_reply_form.inc

File

plugins/content_types/comment/comment_reply_form.inc, line 26

Code

function ctools_comment_reply_form_content_type_render($subtype, $conf, $panel_args, $context) {
  $comment = $context[1]->identifier == t('No context') ? NULL : clone $context[1]->data;
  $block = new stdClass();
  $block->module = 'comments';
  if ($comment) {
    $block->delta = $comment->cid;
  }
  $block->title = t('Add comment');
  $node = $context[0]->data;
  module_load_include('inc', 'comment', 'comment.pages');
  $block->content = comment_reply($node, $comment ? $comment->cid : NULL);
  return $block;
}