Repository navigation
Query for all authors with an unbounded per_page=-1 request - #6627
Conversation
noisysocks
left a comment
There was a problem hiding this comment.
Tested this within Gutenberg and manually by hitting the API endpoint. Everything looks good, and I like this approach more than automatically iterating through pages on the frontend. 👍
Are we able to restrict the API so that only trusted clients (e.g. Gutenberg) can use unbounded queries? I suspect not since, from what I can tell, WP API lacks any notion of an API consumer/client.
wp user generate --role=author --count=150
Didn't know about this—very cool! 🤯
Nope, but I'm fine with it being restricted to users with |
|
@danielbachhuber is |
|
@lkraav Not at this time, no. See conversation in #6180 (comment) |
Description
Queries for all potential authors with an unbounded
GET /wp/v2/users?who=authors&per_page=-1request.Fixes #4622
See #6180 (comment)
How has this been tested?
Generate a bunch of authors programmatically with WP-CLI:
See them all appear in the post author dropdown:
Checklist: