[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 17:04:05 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:  6.1
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api, performance

Comment (by SergeyBiryukov):

 Replying to [comment:10 SergeyBiryukov]:
 > Looking at the tests, 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".

 Looks like I missed [https://github.com/WordPress/wordpress-
 develop/pull/2836#discussion_r904426492 this comment] making an argument
 in favor of "latest" instead of "last". If anyone feels strongly about
 that, feel free to reopen, but in that case I would also suggest updating
 the "last revision" wording in other places.

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

More information about the wp-trac mailing list