trashed_comment action-hookWP 2.9.0

Fires immediately after a comment is sent to Trash.

Usage

add_action( 'trashed_comment', 'wp_kama_trashed_comment_action', 10, 2 );

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

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

Changelog

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

Where the hook is called

wp_trash_comment()
trashed_comment
wp-includes/comment.php 1561
do_action( 'trashed_comment', $comment->comment_ID, $comment );

Where the hook is used in WordPress

Usage not found.