1 comment.module comment_node_prepare(Node $node)

Implements hook_node_prepare().

File

core/modules/comment/comment.module, line 1342
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);
    $node->comment = $node_type->settings['comment_default'];
  }
}