diff --git a/wp-admin/revision.php b/wp-admin/revision.php
index 7be2051699..c3196c635b 100644
--- a/wp-admin/revision.php
+++ b/wp-admin/revision.php
@@ -37,6 +37,10 @@ case 'restore' :
break;
}
+ // Don't allow revision restore when post is locked
+ if ( wp_check_post_lock( $post->ID ) )
+ break;
+
check_admin_referer( "restore-post_{$revision->ID}" );
wp_restore_post_revision( $revision->ID );
@@ -170,10 +174,13 @@ require_once( './admin-header.php' );
({{ data.attributes.dateShort }})
<# if ( 'to' === data.type && data.attributes.restoreUrl ) { #>
-
+ ID ) ) { ?>
disabled="disabled"
- <# } #>
+
+ <# if ( data.attributes.current ) { #>
+ disabled="disabled"
+ <# } #>
+
<# if ( data.attributes.autosave ) { #>
type="button" class="restore-revision button button-primary" value="" />
<# } else { #>