WordPress/wp-includes/rest-api
Joe Hoyle ee94a28953 REST API: Improve formatting of failed validation errors.
If a validation_callback returns a WP_Error it should give the same response format as if it returned `false`. This makes programmatically reading the validation errors better.

Props bradyvercher for initial patch.
Fixes #35028.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 18:23:28 +00:00
..
class-wp-rest-request.php REST API: Improve formatting of failed validation errors. 2015-12-12 18:23:28 +00:00
class-wp-rest-response.php Update WP_REST_Response::as_error() to handle the new format error responses introduced in [35653]. 2015-11-18 18:29:26 +00:00
class-wp-rest-server.php REST API: Core typically sends nocache headers on all auth'ed responses, as in wp, admin-ajax, etc. Because the REST API infrastructure is hooked in pre-wp, we should be setting this ourselves. 2015-12-04 23:36:25 +00:00