Make WordPress Core


Ignore:
Timestamp:
01/02/2021 11:47:42 PM (4 years ago)
Author:
TimothyBlynJacobs
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r49790 r49922  
    966966                    'description' => __( 'Type attribution for the term.' ),
    967967                    'type'        => 'string',
    968                     'enum'        => array_keys( get_taxonomies() ),
     968                    'enum'        => array( $this->taxonomy ),
    969969                    'context'     => array( 'view', 'embed', 'edit' ),
    970970                    'readonly'    => true,
Note: See TracChangeset for help on using the changeset viewer.