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
This commit is contained in:
Scott Taylor 2015-11-11 22:49:50 +00:00
parent c8e0cd5c65
commit 415ab45b9f
2 changed files with 2 additions and 1 deletions

View File

@ -2951,6 +2951,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
$maybe_empty = 'attachment' !== $post_type $maybe_empty = 'attachment' !== $post_type
&& ! $post_content && ! $post_title && ! $post_excerpt && ! $post_content && ! $post_title && ! $post_excerpt
&& ! $update
&& post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'editor' )
&& post_type_supports( $post_type, 'title' ) && post_type_supports( $post_type, 'title' )
&& post_type_supports( $post_type, 'excerpt' ); && post_type_supports( $post_type, 'excerpt' );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.