[wp-trac] [WordPress Trac] #40826: Allow items queried in batch via "slug" to maintain order
WordPress Trac
noreply at wordpress.org
Sat May 20 06:07:51 UTC 2017
#40826: Allow items queried in batch via "slug" to maintain order
----------------------------+-----------------------
Reporter: wonderboymusic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.6
Component: REST API | Version: 4.7.4
Severity: normal | Keywords: has-patch
Focuses: |
----------------------------+-----------------------
When querying endpoints that have items, it is possible to pass an array
of values to the `slug` param. This will filter the result set to only
include slugs that match. This works for posts, pages, media, users,
categories, and tags.
Often, the reason this is happening is so that a remote system can collect
all relevant queries before sending one HTTP request that contains them
all. This was formalized in #40027.
One caveat: the endpoints do not currently have a proper `orderby` value
that ensures the items are returned in the same order they requested.
The best convention I could come up with is: `orderby=slugs`. Patch
incoming.
This is essential for tools like Dataloader
https://github.com/facebook/dataloader#batching
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40826>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list