WordPress.org

Make WordPress Core

Ticket #29080: 29080.patch

File 29080.patch, 554 bytes (added by SergeyBiryukov, 7 years ago)
  • src/wp-includes/post.php

     
    31463146        }
    31473147
    31483148        $post_status = empty( $postarr['post_status'] ) ? 'draft' : $postarr['post_status'];
    3149         if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private' ) ) ) {
     3149        if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private', 'trash' ) ) ) {
    31503150                $post_status = 'inherit';
    31513151        }
    31523152