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.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More