wp_trash_post WordPress Action Hook
The wp_trash_post hook is triggered when a post is trashed. This hook can be used to perform an action when a post is trashed, such as sending an email notification or customizing the trash message.
do_action( 'wp_trash_post', int $post_id ) #
Fires before a post is sent to the Trash.
Parameters
- $post_id
(int)Post ID.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |