~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/revision.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        if ( ! $post = get_post( $revision->post_parent ) )
41
41
                break;
42
42
 
43
 
        // Revisions disabled (previously checked autosaves && ! wp_is_post_autosave( $revision ))
44
 
        if ( ! wp_revisions_enabled( $post ) ) {
 
43
        // Restore if revisions are enabled or this is an autosave.
 
44
        if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
45
45
                $redirect = 'edit.php?post_type=' . $post->post_type;
46
46
                break;
47
47
        }