WordPress/wp-includes/rest-api
Rachel Baker a787006298 REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch().
Use the `rest_authorization_required_code()` function to return a 401 status code when a permission callback fails due to a user not being logged in.

Props jaswrks.
Fixes #42828.
Built from https://develop.svn.wordpress.org/trunk@42421


git-svn-id: http://core.svn.wordpress.org/trunk@42252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-30 20:37:47 +00:00
..
endpoints REST API: Fix permissions error message in post statuses controller. 2017-12-03 20:49:47 +00:00
fields Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-rest-request.php Code is Poetry. 2017-11-30 23:11:00 +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: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch(). 2017-12-30 20:37:47 +00:00