delete_comment, $comment->comment_ID, $comment

delete_comment, $comment->comment_ID, $comment

Appears in:
Hook Type: action

See hook in core

Displaying hooks found in version: 7.0.3

do_action('delete_comment, $comment->comment_ID, $comment') is found 1 times:

  • /wp-includes/comment.php line 1529
    	 *
    	 * @param string     $comment_id The comment ID as a numeric string.
    	 * @param WP_Comment $comment    The comment to be deleted.
    	 */
    	do_action( 'delete_comment', $comment->comment_ID, $comment );
    
    	// Move children up a level.
    	$children = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment->comment_ID ) );
    	if ( ! empty( $children ) ) {
    		$wpdb->update( $wpdb->comments, array( 'comment_parent' => $comment->comment_parent ), array( 'comment_parent' => $comment->comment_ID ) );
    		clean_comment_cache( $children );