pre_delete_post

pre_delete_post

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_delete_post') is found 1 times:

  • /wp-includes/post.php line 3687
    3683
    3684
    3685
    3686
    3687
    3688
    3689
    3690
    3691
    3692
    3693
    * @param WP_Post|false|null $delete       Whether to go forward with deletion.
     * @param WP_Post            $post         Post object.
     * @param bool               $force_delete Whether to bypass the Trash.
     */
    $check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
    if ( null !== $check ) {
        return $check;
    }
     
    /**
     * Fires before a post is deleted, at the start of wp_delete_post().

See this hook used in plugins: