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 