[wp-trac] [WordPress Trac] #40510: REST API: Post Revisions: Adding support for pagination

WordPress Trac noreply at wordpress.org
Tue Aug 28 12:22:51 UTC 2018


#40510: REST API: Post Revisions: Adding support for pagination
--------------------------------------+-----------------------
 Reporter:  benoitperson              |       Owner:  flixos90
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  5.0
Component:  REST API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+-----------------------
Changes (by flixos90):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"43584" 43584]:
 {{{
 #!CommitTicketReference repository="" revision="43584"
 REST API: Support pagination, order, search and other common query
 parameters for revisions.

 The original REST API revisions controller relied on
 `wp_get_post_revisions()`, getting all revisions of a post without any
 possibility to restrict the result. This changeset replaces that function
 call with a proper `WP_Query` setup, replicating how
 `wp_get_post_revisions()` works while offering parameters to alter the
 default behavior.

 Props adamsilverstein, birgire, flixos90.
 Fixes #40510.
 }}}

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


More information about the wp-trac mailing list