mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Revisions: Allow autosaves to be restored when revisions are disabled.
Fixes bug introduced in [23639] where autosaves are not restored if revisions are disabled. Props adamsilverstein. Fixes #36262. Built from https://develop.svn.wordpress.org/trunk@38009 git-svn-id: http://core.svn.wordpress.org/trunk@37950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
602f231a26
commit
c283b3c0c6
@ -40,8 +40,8 @@ case 'restore' :
|
||||
if ( ! $post = get_post( $revision->post_parent ) )
|
||||
break;
|
||||
|
||||
// Revisions disabled (previously checked autosaves && ! wp_is_post_autosave( $revision ))
|
||||
if ( ! wp_revisions_enabled( $post ) ) {
|
||||
// Restore if revisions are enabled or this is an autosave.
|
||||
if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
|
||||
$redirect = 'edit.php?post_type=' . $post->post_type;
|
||||
break;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-beta2-38008';
|
||||
$wp_version = '4.6-beta2-38009';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user