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/tests/phpunit/tests/rest-api/rest-categories-controller.php

    r49603 r49922  
    11411141        $this->assertArrayHasKey( 'slug', $properties );
    11421142        $this->assertArrayHasKey( 'taxonomy', $properties );
    1143         $this->assertSame( array_keys( get_taxonomies() ), $properties['taxonomy']['enum'] );
     1143        $this->assertSame( array( 'category' ), $properties['taxonomy']['enum'] );
    11441144    }
    11451145
Note: See TracChangeset for help on using the changeset viewer.