deleted_comment action-hookWP 2.9.0

Fires immediately after a comment is deleted from the database.

Usage

add_action( 'deleted_comment', 'wp_kama_deleted_comment_action', 10, 2 );

/**
 * Function for `deleted_comment` action-hook.
 * 
 * @param string     $comment_id The comment ID as a numeric string.
 * @param WP_Comment $comment    The deleted comment.
 *
 * @return void
 */
function wp_kama_deleted_comment_action( $comment_id, $comment ){

	// action...
}
$comment_id(string)
The comment ID as a numeric string.
$comment(WP_Comment)
The deleted comment.

Changelog

Since 2.9.0 Introduced.
Since 4.9.0 Added the $comment parameter.

Where the hook is called

wp_delete_comment()
deleted_comment
wp-includes/comment.php 1498
do_action( 'deleted_comment', $comment->comment_ID, $comment );

Where the hook is used in WordPress

Usage not found.