[wp-trac] [WordPress Trac] #57320: Revisions: add filter before deleting revisions

WordPress Trac noreply at wordpress.org
Tue Feb 7 12:38:17 UTC 2023


#57320: Revisions: add filter before deleting revisions
-------------------------------------------------+-------------------------
 Reporter:  jhned                                |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Revisions                            |     Version:  trunk
 Severity:  trivial                              |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  needs-dev-note                                 |  administration
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55254" 55254]:
 {{{
 #!CommitTicketReference repository="" revision="55254"
 Revisions: Add a way to filter the revisions considered for deletion.

 This changeset introduces a new filter for `wp_save_post_revision()`.
 `wp_save_post_revision_revisions_before_deletion` passes the revisions to
 be considered for deletion, and the new revision's post ID.

 This allows extenders to exclude specific revisions from being considered
 for deletion.

 Props jhned, costdev, audrasjb, adamsilverstein, mukesh27.
 Fixes #57320.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57320#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list