From 03e34ab461c19f62967334df903e99759febe7d4 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 31 Oct 2016 11:11:29 +0000 Subject: [PATCH] REST API: Allow a CSV list of user roles to be passed to `/users`. After [39048], this changes explicitly parses the list of user roles as slugs, and adds tests. Props jnylen0. Fixes #38557. Built from https://develop.svn.wordpress.org/trunk@39056 git-svn-id: http://core.svn.wordpress.org/trunk@38998 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-users-controller.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index d366c70371..45769808db 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -1010,6 +1010,9 @@ class WP_REST_Users_Controller extends WP_REST_Controller { 'type' => 'string', ), 'context' => array( 'edit' ), + 'arg_options' => array( + 'sanitize_callback' => 'wp_parse_slug_list', + ), ), 'password' => array( 'description' => __( 'Password for the resource (never included).' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index cd8bb46c4b..ce11867f83 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39055'; +$wp_version = '4.7-beta1-39056'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.