Community Documentation

hook_comment_publish

7 comment.api.php hook_comment_publish($comment)
8 comment.api.php hook_comment_publish($comment)

The comment is being published by the moderator.

Parameters

$comment: Passes in the comment the action is being performed on.

Return value

Nothing.

Related topics

File

modules/comment/comment.api.php, line 115
Hooks provided by the Comment module.

Code

<?php
function hook_comment_publish($comment) {
  drupal_set_message(t('Comment: @subject has been published', array('@subject' => $comment->subject)));
}
?>
Login or register to post comments