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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40376 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
James Nylen
2017-04-05 20:24:27 +00:00
parent 54eb8900dd
commit 99de5d69d7
3 changed files with 46 additions and 3 deletions
@@ -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'
),
);
/**