Action hook 'before_delete_post'

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

Description

Fires before a post is deleted, at the start of wp_delete_post().

Occurrences

Filename Line Number
wp-includes/post.php 3534

Parameters

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

PHP Doc

/**
	 * Fires before a post is deleted, at the start of wp_delete_post().
	 *
	 * @since 3.2.0
	 * @since 5.5.0 Added the `$post` parameter.
	 *
	 * @see wp_delete_post()
	 *
	 * @param int     $post_id Post ID.
	 * @param WP_Post $post    Post object.
	 */