[wp-trac] [WordPress Trac] #42202: REST API: no equivalent for `who=authors` to display potential authors

WordPress Trac noreply at wordpress.org
Thu Oct 12 16:49:40 UTC 2017


#42202: REST API: no equivalent for `who=authors` to display potential authors
-------------------------+-----------------------------
 Reporter:  iseulde      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 Currently there is no query argument on the users endpoint to only display
 users who have the right capabilities to become an author. This would be
 useful to create a dropdown of users for an edit post page, equivalent to
 the author dropdown on the `wp-admin/post.php` page.

 These issues for the Gutenberg editor illustrate the problem further:

 * https://github.com/WordPress/gutenberg/issues/2157
 * https://github.com/WordPress/gutenberg/issues/3010

 Without this query argument we have two options, both with limitations:

 * Use `/wp/v2/users?context=edit`, and filter on the client side by user
 level, but this can't be done for non-admins.
 * Use `/wp/v2/users?roles=author,editor,administrator`, but this wouldn't
 catch roles created by plugins, or capability changes by plugins.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42202>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list