From d83ac79c38100318bb945d8c7021b2b9fef56072 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 1 Aug 2014 15:14:56 +0000 Subject: [PATCH] Unbreak `Media Trash` after [28788]. Props SergeyBiryukov. Fixes #29080. git-svn-id: https://develop.svn.wordpress.org/trunk@29337 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 2e70023a20..eaeedd5053 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -3146,7 +3146,7 @@ function wp_insert_post( $postarr, $wp_error = false ) { } $post_status = empty( $postarr['post_status'] ) ? 'draft' : $postarr['post_status']; - if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private' ) ) ) { + if ( 'attachment' === $post_type && ! in_array( $post_status, array( 'inherit', 'private', 'trash' ) ) ) { $post_status = 'inherit'; }