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:
Scott Taylor 2015-11-11 22:48:55 +00:00
parent 69106a5971
commit 84aeb528fa

View File

@ -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' );