From 9524ebb38e7e01994ab43d03bdb007011bdca365 Mon Sep 17 00:00:00 2001 From: Ryan McCue Date: Tue, 17 Nov 2015 02:49:28 +0000 Subject: [PATCH] REST API: Include enum and description in help data. Props lcherpit. Fixes #34543. Built from https://develop.svn.wordpress.org/trunk@35652 git-svn-id: http://core.svn.wordpress.org/trunk@35616 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api/class-wp-rest-server.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/rest-api/class-wp-rest-server.php b/wp-includes/rest-api/class-wp-rest-server.php index 1a239a596b..05e10a9399 100644 --- a/wp-includes/rest-api/class-wp-rest-server.php +++ b/wp-includes/rest-api/class-wp-rest-server.php @@ -1064,6 +1064,12 @@ class WP_REST_Server { if ( isset( $opts['default'] ) ) { $arg_data['default'] = $opts['default']; } + if ( isset( $opts['enum'] ) ) { + $arg_data['enum'] = $opts['enum']; + } + if ( isset( $opts['description'] ) ) { + $arg_data['description'] = $opts['description']; + } $endpoint_data['args'][ $key ] = $arg_data; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index e2377eb708..194f88b4c5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35651'; +$wp_version = '4.4-beta4-35652'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.