Use wp_revisions_enabled(). props ethitter. fixes #24525.

git-svn-id: http://core.svn.wordpress.org/trunk@24425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-06-07 02:06:22 +00:00
parent b2fc7d1b8b
commit 4263262f40

View File

@ -26,7 +26,7 @@ case 'restore' :
break;
// Revisions disabled (previously checked autosavegs && ! wp_is_post_autosave( $revision ))
if ( ( ! WP_POST_REVISIONS || ! post_type_supports( $post->post_type, 'revisions' ) ) ) {
if ( ! wp_revisions_enabled( $post ) ) {
$redirect = 'edit.php?post_type=' . $post->post_type;
break;
}