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.

Merges [40376] to the 4.7 branch.

Built from https://develop.svn.wordpress.org/branches/4.7@40427


git-svn-id: http://core.svn.wordpress.org/branches/4.7@40325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2017-04-14 08:54:35 +00:00
parent 981dc8e4c2
commit aaf7176230
2 changed files with 5 additions and 2 deletions

View File

@ -979,7 +979,10 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
$query_params['slug'] = array( $query_params['slug'] = array(
'description' => __( 'Limit result set to terms with a specific slug.' ), '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 * @global string $wp_version
*/ */
$wp_version = '4.7.4-alpha-40426'; $wp_version = '4.7.4-alpha-40427';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.