1 comment.module comment_node_prepare(Node $node)

Implements hook_node_prepare().

File

core/modules/comment/comment.module, line 1384
Enables users to comment on published content.

Code

function comment_node_prepare(Node $node) {
  if (!isset($node->comment)) {
    $node_type = node_type_get_type($node->type);
    if ($node_type->settings['comment_enabled']) {
      $node->comment = $node_type->settings['comment_default'];
    }
  }
}