[wp-trac] [WordPress Trac] #55857: Usage of wp_get_post_revisions in WP_REST_Posts_Controller
WordPress Trac
noreply at wordpress.org
Fri Aug 5 13:01:13 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):
In [changeset:"53841" 53841]:
{{{
#!CommitTicketReference repository="" revision="53841"
Revisions: Use `latest_id` as the array key for the latest revision ID.
This updates `wp_get_latest_revision_id_and_total_count()` and its usage
to be a bit more descriptive and a bit less repetitive, e.g.
`$revisions['latest_id']` instead of `$revision['revision']`.
Includes updating the `@return` tag to explain when the function returns a
`WP_Error`.
Follow-up to [53759], [53769], [53778], [53779].
See #55857.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55857#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list