From e1da1ae3e40b3273a0ee804883c50fb1cf3549e5 Mon Sep 17 00:00:00 2001 From: TimothyBlynJacobs Date: Sat, 15 Aug 2020 16:11:07 +0000 Subject: [PATCH] REST API: Add uniqueItems as a permitted endpoint argument JSON Schema keyword. Support for the `uniqueItems` keyword was added in [48357], but wasn't included in the list of permitted keywords for `WP_REST_Controller::get_endpoint_args_for_item_schema()`. This prevented the keyword from being automatically supported if specified in a controller's item schema. Fixes #51021. Built from https://develop.svn.wordpress.org/trunk@48796 git-svn-id: http://core.svn.wordpress.org/trunk@48558 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api/endpoints/class-wp-rest-controller.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php index 0d1e85cbf1..44880aaec2 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php @@ -645,6 +645,7 @@ abstract class WP_REST_Controller { 'pattern', 'minItems', 'maxItems', + 'uniqueItems', ); foreach ( $schema_properties as $field_id => $params ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5dccdf5322..2bdabfd85d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48795'; +$wp_version = '5.6-alpha-48796'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.