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:
Ryan McCue
2015-11-17 02:49:28 +00:00
parent b03e036e94
commit 9524ebb38e
2 changed files with 7 additions and 1 deletions

View File

@@ -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;
}
}