REST API: Include enum and description in help data.
Props lcherpit. Fixes #34543. git-svn-id: https://develop.svn.wordpress.org/trunk@35652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0a501976db
commit
10ecf65a4a
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user