mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@28334 git-svn-id: http://core.svn.wordpress.org/trunk@28162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5bc59586da
commit
5b6b17fc80
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user