From 415ab45b9f6a790d8cbf78fbbce148b36e78c16b Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Nov 2015 22:49:50 +0000 Subject: [PATCH] Posts: allow empty posts to be deleted - `$maybe_empty` should not be set to `true` for updates. Props DrewAPicture. Fixes #30775. Built from https://develop.svn.wordpress.org/trunk@35621 git-svn-id: http://core.svn.wordpress.org/trunk@35585 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-functions.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 5687e34ad6..13db984fe4 100644 --- a/wp-includes/post-functions.php +++ b/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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 97757ea531..37d733c11c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta3-35620'; +$wp_version = '4.4-beta3-35621'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.