mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add missing doc blocks to revision.php.
Clarify `@return` values where necessary. In `wp_delete_post_revision()`, `wp_delete_post()` doesn't return `WP_Error`, so that check can be removed. `wp_revisions_to_keep()` always returns an `int`, so `wp_revisions_enabled()` can use strict comparison. See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32621 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2608,7 +2608,7 @@ function wp_delete_post( $postid = 0, $force_delete = false ) {
|
||||
return $post;
|
||||
|
||||
if ( !$force_delete && ( $post->post_type == 'post' || $post->post_type == 'page') && get_post_status( $postid ) != 'trash' && EMPTY_TRASH_DAYS )
|
||||
return wp_trash_post($postid);
|
||||
return wp_trash_post( $postid );
|
||||
|
||||
if ( $post->post_type == 'attachment' )
|
||||
return wp_delete_attachment( $postid, $force_delete );
|
||||
|
||||
Reference in New Issue
Block a user