[wp-trac] [WordPress Trac] #51550: Revisions: Add a post type-specific filter to `wp_revisions_to_keep()`

WordPress Trac noreply at wordpress.org
Fri May 21 15:28:53 UTC 2021


#51550: Revisions: Add a post type-specific filter to `wp_revisions_to_keep()`
-------------------------------------------------+-------------------------
 Reporter:  dlh                                  |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Revisions                            |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note commit                                    |
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

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


Comment:

 In [changeset:"50949" 50949]:
 {{{
 #!CommitTicketReference repository="" revision="50949"
 Revisions: add a new filter for revisions to keep by post type.

 Add a new `wp_{$post_type}_revisions_to_keep` filter that makes it
 convenient to filter the number of revisions created for a specific post
 type.

 Overrides both the value of WP_POST_REVISIONS and the
 `wp_revisions_to_keep` filter.

 Props dlh.
 Fixes #51550.
 }}}

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


More information about the wp-trac mailing list