REST API: Allow fetching multiple terms at once via the slug parameter.

This matches a similar change previously made for posts (#38579) and an upcoming change for users (#40213).

Props wonderboymusic, MatheusGimenez, curdin.
Fixes #40027.

Built from https://develop.svn.wordpress.org/trunk@40376


git-svn-id: http://core.svn.wordpress.org/trunk@40283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
James Nylen 2017-04-05 20:25:46 +00:00
parent a212ed8e25
commit 9f2d94b211
2 changed files with 5 additions and 2 deletions

View File

@ -978,7 +978,10 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$query_params['slug'] = array(
'description' => __( 'Limit result set to terms with a specific slug.' ),
'type' => 'string',
'type' => 'array',
'items' => array(
'type' => 'string'
),
);
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40372';
$wp_version = '4.8-alpha-40376';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.