1 comment.module comment_publish_action($comment, $context = array())

Publishes a comment.

Parameters

$comment: The comment object.

Related topics

File

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

Code

function comment_publish_action($comment, $context = array()) {
  $comment->status = COMMENT_PUBLISHED;
  $comment->save();
}