Elegantly prune post revisions
WordPress will trim revisions on a post when creating new revisions, this is how it does it at the end of wp_save_post_revision: // If a limit for the number of revisions to keep has been set, // delete the oldest ones. $revisions_to_keep = wp_revisions_to_keep( $post ); if ( $revisions_to_keep < 0 ) { return $return; … Read more