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:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user