JRoy
6/8/2018 - 1:28 PM

Limit Post Revisions

// Limit post revisions
add_filter( 'wp_revisions_to_keep', 'sm_set_revision_size', 10, 2 );
function sm_set_revision_size( $num, $post ) { 
    return 4;  //here allowed revisions are upto 5. 
}