Make WordPress Core


Ignore:
Timestamp:
01/02/2021 11:47:42 PM (3 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/tests/phpunit/tests/rest-api/rest-tags-controller.php

    r49603 r49922  
    12341234        $this->assertArrayHasKey( 'slug', $properties );
    12351235        $this->assertArrayHasKey( 'taxonomy', $properties );
    1236         $this->assertSame( array_keys( get_taxonomies() ), $properties['taxonomy']['enum'] );
     1236        $this->assertSame( array( 'post_tag' ), $properties['taxonomy']['enum'] );
    12371237    }
    12381238
Note: See TracChangeset for help on using the changeset viewer.