id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 57320,Revisions: add filter before deleting revisions,jhned,johnbillion,"I'm in a situation where I need to preserve the original post revision and prevent it from being deleted once a post is past the max number of revisions for the site. This is more difficult than it seemed, because WordPress doesn't have many filters around the revisions delete process. If we add a new filter to the result of `wp_get_post_revisions` in [https://github.com/WordPress/WordPress/blob/master/wp-includes/revision.php#L201 revision.php], then I'd be able to slice out the revision that I don't want to get deleted and instead delete the next-oldest one.",enhancement,closed,normal,6.2,Revisions,,trivial,fixed,has-patch has-unit-tests needs-dev-note changes-requested commit,,administration