trashed_comment

trashed_comment

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.9

do_action('trashed_comment') is found 1 times:

  • /wp-includes/comment.php line 1642
    		 *
    		 * @param string     $comment_id The comment ID as a numeric string.
    		 * @param WP_Comment $comment    The trashed comment.
    		 */
    		do_action( 'trashed_comment', $comment->comment_ID, $comment );
    
    		// For top level 'note' type comments, also trash children.
    		if ( 'note' === $comment->comment_type && 0 === (int) $comment->comment_parent ) {
    			$children = $comment->get_children(
    				array(
    					'fields' => 'ids',
    

See this hook used in plugins: