[wp-trac] [WordPress Trac] #56279: Use wp_get_latest_revision_id_and_total_count() where appropriate

WordPress Trac noreply at wordpress.org
Fri Aug 5 13:38:03 UTC 2022


#56279: Use wp_get_latest_revision_id_and_total_count() where appropriate
----------------------------+-----------------------------
 Reporter:  SergeyBiryukov  |       Owner:  SergeyBiryukov
     Type:  enhancement     |      Status:  closed
 Priority:  normal          |   Milestone:  6.1
Component:  Revisions       |     Version:  trunk
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53842" 53842]:
 {{{
 #!CommitTicketReference repository="" revision="53842"
 Revisions: Use `wp_get_latest_revision_id_and_total_count()` where
 appropriate.

 The function executes an optimized query to get the last revision ID and
 total count. It was originally introduced for
 `WP_REST_Posts_Controller::prepare_links()`, and is now used in a few more
 places in core:

 * `register_and_do_post_meta_boxes()`
 * `wp_get_post_revisions_url()`
 * `wp_update_custom_css_post()`

 Follow-up to [53759], [53769], [53778], [53779], [53841].

 Props peterwilsoncc, mukesh27, SergeyBiryukov.
 Fixes #56279.
 }}}

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


More information about the wp-trac mailing list