WordPress/wp-includes/rest-api
Gary Pendergast 41968f7ea9 REST API: Add who=authors as a query parameter for GET wp/v2/users.
Any WordPress user who can `edit_posts` of a post type with `show_in_rest=true` can query for authors. This maps to current WordPress behavior where a WordPress user who can view the Manage Posts view for a post type can see any WordPress user assigned to a post (whether published or draft).

This implementation, over restricting `who=authors` to users with `list_users`, gives us future flexibility in displaying lists of posts. It still respects more restrictive permissions for `context=edit`.

Props danielbachhuber.
Fixes #42202.


Built from https://develop.svn.wordpress.org/trunk@43001


git-svn-id: http://core.svn.wordpress.org/trunk@42830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 13:06:21 +00:00
..
endpoints REST API: Add who=authors as a query parameter for GET wp/v2/users. 2018-04-25 13:06:21 +00:00
fields Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-rest-request.php Docs: Remove @static notations from method DocBlocks in wp-includes/* classes. 2018-02-25 20:22:30 +00:00
class-wp-rest-response.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-rest-server.php REST API: Remove permalink_structure from the index. 2018-04-23 04:12:20 +00:00