REST API: Add missing sanitization callback for the `hide_empty` parameter of the Terms Controller.

Fixes a bug where the boolean parameter `hide_empty` was not being properly sanitized in the Terms controller.

Props websupporter.
Fixes #38465.
Built from https://develop.svn.wordpress.org/trunk@38942


git-svn-id: http://core.svn.wordpress.org/trunk@38885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-10-26 02:29:30 +00:00
parent 50e4ab375d
commit b13da6ae73
2 changed files with 2 additions and 1 deletions

View File

@ -867,6 +867,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
'description' => __( 'Whether to hide resources not assigned to any posts.' ),
'type' => 'boolean',
'default' => false,
'sanitize_callback' => 'rest_sanitize_request_arg',
'validate_callback' => 'rest_validate_request_arg',
);
if ( $taxonomy->hierarchical ) {

View File

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