You are here

function hook_comment_delete in Drupal 7

The comment is being deleted by the moderator.

Parameters

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

Return value

Nothing.

Related topics

5 functions implement hook_comment_delete()

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

entity_crud_hook_test_comment_delete in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_comment_delete().
forum_comment_delete in modules/forum/forum.module
Implements hook_comment_delete().
search_comment_delete in modules/search/search.module
Implements hook_comment_delete().
tracker_comment_delete in modules/tracker/tracker.module
Implements hook_comment_delete().
trigger_comment_delete in modules/trigger/trigger.module
Implements hook_comment_delete().
1 invocation of hook_comment_delete()
comment_delete_multiple in modules/comment/comment.module
Delete comments and all their replies.

File

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

Code

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