From 0fbddaa2d2eb0ca2142735ce6cc9a3c060a31f8d Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 1 Aug 2014 15:15:17 +0000 Subject: [PATCH] Unbreak `Media Trash` after [28788]. Props SergeyBiryukov. Fixes #29080. Built from https://develop.svn.wordpress.org/trunk@29337 git-svn-id: http://core.svn.wordpress.org/trunk@29117 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 2e70023a20..eaeedd5053 100644 --- a/wp-includes/post.php +++ b/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'; }