[wp-trac] [WordPress Trac] #38579: REST API: Allow listing posts that match any of a set of slugs rather than just one
WordPress Trac
noreply at wordpress.org
Mon Oct 31 00:27:33 UTC 2016
#38579: REST API: Allow listing posts that match any of a set of slugs rather than
just one
--------------------------------------+------------------------------
Reporter: jnylen0 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Changes (by jnylen0):
* keywords: has-patch has-unit-tests reporter-feedback => has-patch has-
unit-tests
Comment:
I'm mainly trying to improve consistency across different arguments, and
continuing with similar tasks as #38553. You can already query by post
IDs for example, and querying by slug seems likely to be even more useful
than that.
When querying by a single slug, this changes the generated SQL from `WHERE
name = '...'` to `WHERE name IN ('...')`. This didn't seem like a problem
to me, and I don't understand why removing `name` would be a problem
either given that there is still a way to do the same thing.
> You can still use `post_name__in` with authenticated users OR by adding
it to the `rest_query_vars` filter.
This is not supported out of the box though, correct?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38579#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list