[wp-trac] [WordPress Trac] #55857: Usage of wp_get_post_revisions in WP_REST_Posts_Controller

WordPress Trac noreply at wordpress.org
Fri Jul 22 13:22:19 UTC 2022


#55857: Usage of wp_get_post_revisions in WP_REST_Posts_Controller
--------------------------------------+------------------------------------
 Reporter:  furi3r                    |       Owner:  spacedmonkey
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api, performance
--------------------------------------+------------------------------------
Changes (by spacedmonkey):

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


Comment:

 In [changeset:"53759" 53759]:
 {{{
 #!CommitTicketReference repository="" revision="53759"
 REST API: Use `wp_get_lastest_revision_id_and_total_count` function in
 `WP_REST_Posts_Controller` class.

 Add new function called `wp_get_lastest_revision_id_and_total_count`, that
 performs an optimized query to get the last revision and total and use it
 in `WP_REST_Posts_Controller` class.

 Props Spacedmonkey, timothyblynjacobs, furi3r, peterwilsoncc.
 Fixes #55857.
 }}}

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


More information about the wp-trac mailing list