REST API: Only include the controller's own taxonomy in it's schema.
Previously, all taxonomies were incorrectly exposed as possible values. Props johnbillion. Fixes #51940. Built from https://develop.svn.wordpress.org/trunk@49922 git-svn-id: http://core.svn.wordpress.org/trunk@49621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -965,7 +965,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
||||
'taxonomy' => array(
|
||||
'description' => __( 'Type attribution for the term.' ),
|
||||
'type' => 'string',
|
||||
'enum' => array_keys( get_taxonomies() ),
|
||||
'enum' => array( $this->taxonomy ),
|
||||
'context' => array( 'view', 'embed', 'edit' ),
|
||||
'readonly' => true,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user