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
This commit is contained in:
Scott Taylor 2014-08-01 15:15:17 +00:00
parent b9886e92e3
commit 0fbddaa2d2
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';
} }