REST API: Enable sanitize_callback to return WP_Error.

Give developers the opportunity to reject incoming data without using the validation callback. It also enables us to do sanitization and validation in one function in instances where this could be useful.

Props websupporter, rmccue.
Fixes #37560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe Hoyle
2016-09-14 15:50:29 +00:00
parent d7f840a211
commit 794dd5d8cb
3 changed files with 25 additions and 9 deletions

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38600';
$wp_version = '4.7-alpha-38601';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.