Make WordPress Core

Ticket #42030: 42030.patch

File 42030.patch, 620 bytes (added by bor0, 9 years ago)
  • wp-includes/post.php

     
    25962596                return false;
    25972597
    25982598        /**
     2599         * Filters whether trashing a post should take place.
     2600         *
     2601         * @since 4.8.2
     2602         *
     2603         * @param bool    $trash        Whether to go forward with trashing.
     2604         * @param WP_Post $post         Post object.
     2605         */
     2606        $check = apply_filters( 'pre_trash_post', null, $post );
     2607        if ( null !== $check ) {
     2608                return $check;
     2609        }
     2610
     2611        /**
    25992612         * Fires before a post is sent to the trash.
    26002613         *
    26012614         * @since 3.3.0