mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-11 16:14:32 +00:00
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:
@@ -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' );
|
||||
|
||||
Reference in New Issue
Block a user