comment_approve

Versions
7
comment_approve($comment)

Menu callback; publish specified comment.

Parameters

$comment A comment object.

Code

modules/comment/comment.pages.inc, line 108

<?php
function comment_approve($comment) {
  $comment->status = COMMENT_PUBLISHED;
  $comment->comment_format = $comment->format;
  comment_save($comment);

  drupal_set_message(t('Comment approved.'));
  drupal_goto('node/' . $comment->nid);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.