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:
Scott Taylor
2015-05-27 18:37:29 +00:00
parent d1675e2571
commit 496b36db35
2 changed files with 51 additions and 39 deletions

View File

@@ -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 );