You are here

function panels_content_node_comments in Panels 6.2

Same name and namespace in other branches
  1. 5.2 content_types/node_comments.inc \panels_content_node_comments()
1 string reference to 'panels_content_node_comments'
panels_node_comments_panels_content_types in content_types/node_comments.inc
Plugin declaration function - returns a plugin definition array that describes the content type.

File

content_types/node_comments.inc, line 23

Code

function panels_content_node_comments($subtype, $conf, $panel_args, $context) {
  $node = isset($context->data) ? drupal_clone($context->data) : NULL;
  $block = new stdClass();
  $block->module = 'comments';
  $block->delta = $node->nid;
  $block->subject = t('Comments');
  if (empty($node)) {
    $block->content = t('Node comments go here.');
  }
  else {
    $block->content = panels_comment_render($node, $conf);

    // Update the history table, stating that this user viewed this node.
    node_tag_new($node->nid);
  }
  return $block;
}