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:
parent
50e4ab375d
commit
b13da6ae73
|
@ -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 ) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue