Action hook 'delete_post'

in WP Core File wp-includes/post.php at line 3614

Description

Fires immediately before a post is deleted from the database.

Occurrences

Filename Line Number
wp-includes/post.php 3614
wp-includes/post.php 6456

Parameters

Type Name Description
int $post_id Post ID.
WP_Post $post Post object.

PHP Doc

/**
	 * Fires immediately before a post is deleted from the database.
	 *
	 * @since 1.2.0
	 * @since 5.5.0 Added the `$post` parameter.
	 *
	 * @param int     $post_id Post ID.
	 * @param WP_Post $post    Post object.
	 */