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