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:
parent
b9886e92e3
commit
0fbddaa2d2
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue