From 5c064bb139c414bb9a9cb4265ff4a57952e44aa4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 Jul 2020 20:41:13 +0000 Subject: [PATCH] Docs: Synchronize some comments in `wp-admin/revision.php`. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48624 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/revision.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/revision.php b/src/wp-admin/revision.php index b1590ee6d7..43cc266748 100644 --- a/src/wp-admin/revision.php +++ b/src/wp-admin/revision.php @@ -47,13 +47,13 @@ switch ( $action ) { break; } - // Restore if revisions are enabled or this is an autosave. + // Don't restore if revisions are disabled and this is not an autosave. if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { $redirect = 'edit.php?post_type=' . $post->post_type; break; } - // Don't allow revision restore when post is locked. + // Don't restore if the post is locked. if ( wp_check_post_lock( $post->ID ) ) { break; } @@ -61,6 +61,7 @@ switch ( $action ) { check_admin_referer( "restore-post_{$revision->ID}" ); wp_restore_post_revision( $revision->ID ); + $redirect = add_query_arg( array( 'message' => 5, @@ -86,7 +87,7 @@ switch ( $action ) { break; } - // Revisions disabled and we're not looking at an autosave. + // Bail if revisions are disabled and this is not an autosave. if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) { $redirect = 'edit.php?post_type=' . $post->post_type; break;