REST API: Use the items attribute for the taxonomies types schema property for proper sanitization/validation.

Props danielbachhuber, joehoyle.
Fixes #38631.
Built from https://develop.svn.wordpress.org/trunk@39103


git-svn-id: http://core.svn.wordpress.org/trunk@39045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-11-03 01:26:28 +00:00
parent 89a70eb859
commit 676ae9fc2b
2 changed files with 4 additions and 1 deletions

View File

@ -279,6 +279,9 @@ class WP_REST_Taxonomies_Controller extends WP_REST_Controller {
'types' => array(
'description' => __( 'Types associated with resource.' ),
'type' => 'array',
'items' => array(
'type' => 'string',
),
'context' => array( 'view', 'edit' ),
'readonly' => true,
),

View File

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