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

git-svn-id: https://develop.svn.wordpress.org/trunk@24425 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-06-07 02:06:22 +00:00
parent ebcf303db6
commit 71fcaad59b
1 changed files with 1 additions and 1 deletions

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;
}