Take revision control out of the realm of a pure constant. Make it filterable.

* New filter: wp_revisions_to_keep

props ethitter, SergeyBiryukov. fixes #22289.

git-svn-id: https://develop.svn.wordpress.org/trunk@23818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2013-03-27 18:11:56 +00:00
parent 17d4a3302b
commit 404aa52ea2
3 changed files with 54 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ default :
break;
// Revisions disabled and we're not looking at an autosave
if ( ( ! WP_POST_REVISIONS || !post_type_supports($post->post_type, 'revisions') ) && !wp_is_post_autosave( $revision ) ) {
if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
$redirect = 'edit.php?post_type=' . $post->post_type;
break;
}