pre_delete_post WordPress Filter Hook

The pre_delete_post hook is fired before a post is deleted from the database. This hook can be used to perform any actions before the post is deleted, such as deleting associated data or backups.

apply_filters( 'pre_delete_post', WP_Post|false|null $delete, WP_Post $post, bool $force_delete ) #

Filters whether a post deletion should take place.


Parameters

$delete

(WP_Post|false|null)Whether to go forward with deletion. @TODO description

$post

(WP_Post)Post object.

$force_delete

(bool)Whether to bypass the Trash.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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