From 84aeb528fa1d6bf32512fe9090c552472bb1f37f Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Nov 2015 22:48:55 +0000 Subject: [PATCH] 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 --- src/wp-includes/post-functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/post-functions.php b/src/wp-includes/post-functions.php index 5687e34ad6..13db984fe4 100644 --- a/src/wp-includes/post-functions.php +++ b/src/wp-includes/post-functions.php @@ -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' );