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
This commit is contained in:
parent
b03e036e94
commit
9524ebb38e
|
@ -1064,6 +1064,12 @@ class WP_REST_Server {
|
||||||
if ( isset( $opts['default'] ) ) {
|
if ( isset( $opts['default'] ) ) {
|
||||||
$arg_data['default'] = $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;
|
$endpoint_data['args'][ $key ] = $arg_data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue