In `wp-includes/revision.php` - remove dead code:

* In `wp_get_post_autosave()`, `break` is unreachable after `return`
* In `_wp_put_post_revision()`, `$post_id` is set then never used.

See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-07 03:37:45 +00:00
parent 098a5145c5
commit f63b6cde3a
1 changed files with 0 additions and 2 deletions

View File

@ -190,7 +190,6 @@ function wp_get_post_autosave( $post_id, $user_id = 0 ) {
continue;
return $revision;
break;
}
}
@ -254,7 +253,6 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
if ( isset($post['post_type']) && 'revision' == $post['post_type'] )
return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
$post_id = $post['ID'];
$post = _wp_post_revision_fields( $post, $autosave );
$post = wp_slash($post); //since data is from db