Posts: allow empty posts to be deleted - $maybe_empty
should not be set to true
for updates.
Props DrewAPicture. Fixes #30775. git-svn-id: https://develop.svn.wordpress.org/trunk@35621 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
69106a5971
commit
84aeb528fa
@ -2951,6 +2951,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
|
||||
$maybe_empty = 'attachment' !== $post_type
|
||||
&& ! $post_content && ! $post_title && ! $post_excerpt
|
||||
&& ! $update
|
||||
&& post_type_supports( $post_type, 'editor' )
|
||||
&& post_type_supports( $post_type, 'title' )
|
||||
&& post_type_supports( $post_type, 'excerpt' );
|
||||
|
Loading…
Reference in New Issue
Block a user