Action hook 'trashed_post'

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

Description

Fires after a post is sent to the Trash.

Occurrences

Filename Line Number
wp-includes/post.php 3784
wp-includes/class-wp-customize-manager.php 3128

Parameters

Type Name Description
int $post_id Post ID.
string $previous_status The status of the post at the point where it was trashed.

PHP Doc

/**
	 * Fires after a post is sent to the Trash.
	 *
	 * @since 2.9.0
	 * @since 6.3.0 Added the `$previous_status` parameter.
	 *
	 * @param int    $post_id         Post ID.
	 * @param string $previous_status The status of the post at the point where it was trashed.
	 */