trashed_post

trashed_post

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('trashed_post') is found 2 times:

  • /wp-includes/class-wp-customize-manager.php line 3123
     
    		wp_trash_post_comments( $post_id );
    
    		/** This action is documented in wp-includes/post.php */
    		do_action( 'trashed_post', $post_id, $previous_status );
    
    		return $post;
    	}
    
    	/**
    	 * Handles request to trash a changeset.
    
  • /wp-includes/post.php line 3721
    	 *
    	 * @param int    $post_id         Post ID.
    	 * @param string $previous_status The status of the post at the point where it was trashed.
    	 */
    	do_action( 'trashed_post', $post_id, $previous_status );
    
    	return $post;
    }
    
    /**
     * Restores a post from the Trash.
    

See this hook used in plugins: