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

Props danielbachhuber, joehoyle.
Fixes #38631.

git-svn-id: https://develop.svn.wordpress.org/trunk@39103 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker 2016-11-03 01:25:48 +00:00
parent 22bb12dd61
commit a0876e06cd
1 changed files with 3 additions and 0 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,
),