Unbreak `Media Trash` after [28788].

Props SergeyBiryukov.
Fixes #29080.


git-svn-id: https://develop.svn.wordpress.org/trunk@29337 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-08-01 15:14:56 +00:00
parent c94edd08bd
commit d83ac79c38
1 changed files with 1 additions and 1 deletions

View File

@ -3146,7 +3146,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
} }
$post_status = empty( $postarr['post_status'] ) ? 'draft' : $postarr['post_status']; $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'; $post_status = 'inherit';
} }