You are here

function hook_comment_publish in Drupal 7

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

3 functions implement hook_comment_publish()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

forum_comment_publish in modules/forum/forum.module
Implements hook_comment_publish().
search_comment_publish in modules/search/search.module
Implements hook_comment_publish().
tracker_comment_publish in modules/tracker/tracker.module
Implements hook_comment_publish().
1 invocation of hook_comment_publish()
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.

File

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

Code

function hook_comment_publish($comment) {
  drupal_set_message(t('Comment: @subject has been published', array(
    '@subject' => $comment->subject,
  )));
}