Make WordPress Core

Ticket #32933: 32933.diff

File 32933.diff, 798 bytes (added by boonebgorges, 9 years ago)
  • src/wp-includes/post.php

    diff --git src/wp-includes/post.php src/wp-includes/post.php
    index 6c58c85..88608f9 100644
    function wp_delete_post( $postid = 0, $force_delete = false ) { 
    26242624                return wp_delete_attachment( $postid, $force_delete );
    26252625
    26262626        /**
     2627         * Filter whether a post deletion should take place.
     2628         *
     2629         * @since 4.4.0
     2630         *
     2631         * @param bool    $delete       Whether to go forward with deletion.
     2632         * @param WP_Post $post         Post object.
     2633         * @param bool    $force_delete Whether to bypass the trash.
     2634         */
     2635        $check = apply_filters( 'pre_delete_post', null, $post, $force_delete );
     2636        if ( null !== $check ) {
     2637                return $check;
     2638        }
     2639
     2640        /**
    26272641         * Fires before a post is deleted, at the start of wp_delete_post().
    26282642         *
    26292643         * @since 3.2.0