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

WordPress Trac noreply at wordpress.org
Sat Jul 23 15:37:48 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
--------------------------------------+------------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:9 JustinSainton]:
 > Maybe a silly note, but this reads odd to me as
 `wp_get_lastest_revision_id_and_total_count` instead of
 `wp_get_latest_revision_id_and_total_count`, especially when the docs use
 the word `latest` and not `lastest`

 Good point. Looking at the test, they mention
 "wp_get_'''last'''_revision_id_and_total_count()", and the variable name
 is `$last_revision` (here and in a few other places in core), so I think
 this was supposed to be "last".

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


More information about the wp-trac mailing list