From 9f2d94b2111e4b61371070afe551bbac0231026e Mon Sep 17 00:00:00 2001 From: James Nylen Date: Wed, 5 Apr 2017 20:25:46 +0000 Subject: [PATCH] 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 --- .../rest-api/endpoints/class-wp-rest-terms-controller.php | 5 ++++- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index 9d33eaa475..1a316308fe 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -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' + ), ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index c7bd8aea01..60768e10cb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.