WordPress/wp-includes/rest-api/endpoints
Sergey Biryukov 59a7fbddde 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.
Merges [43001] to the 4.9 branch.
Fixes #42202.
Built from https://develop.svn.wordpress.org/branches/4.9@43067


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 22:18:26 +00:00
..
class-wp-rest-attachments-controller.php Media: Bring consistency to getimagesize() error suppression. 2018-01-15 20:02:39 +00:00
class-wp-rest-comments-controller.php REST API: Avoid counting an uncountable type when checking read permissions for comment posts. 2017-10-04 15:38:49 +00:00
class-wp-rest-controller.php REST API: Don’t remove unregistered properties from objects in schema. 2017-10-24 21:05:49 +00:00
class-wp-rest-post-statuses-controller.php REST API: Specify specific json-schema version. 2017-10-04 14:52:46 +00:00
class-wp-rest-post-types-controller.php REST API: Include viewable attribute on Post Type resource for edit context. 2018-04-30 04:31:25 +00:00
class-wp-rest-posts-controller.php REST API: Allow passing existing template value for posts even when template no longer exists. 2017-10-23 22:11:46 +00:00
class-wp-rest-revisions-controller.php REST API: Specify specific json-schema version. 2017-10-04 14:52:46 +00:00
class-wp-rest-settings-controller.php REST API: Don’t remove unregistered properties from objects in schema. 2017-10-24 21:05:49 +00:00
class-wp-rest-taxonomies-controller.php REST API: Specify specific json-schema version. 2017-10-04 14:52:46 +00:00
class-wp-rest-terms-controller.php REST API: Add existing term_id to the error data object when attempting to create a duplicate term. 2018-01-23 20:22:39 +00:00
class-wp-rest-users-controller.php REST API: Add who=authors as a query parameter for GET wp/v2/users. 2018-05-01 22:18:26 +00:00