mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
REST API: Clean up argument and property types.
There's a couple of places where we were missing type notes for arguments, which mainly affects documentation. Props jnylen0. Fixes #38792. git-svn-id: https://develop.svn.wordpress.org/trunk@39250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -86,6 +86,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
'context' => $this->get_context_param( array( 'default' => 'view' ) ),
|
||||
'password' => array(
|
||||
'description' => __( 'The password for the post if it is password protected.' ),
|
||||
'type' => 'string',
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2069,6 +2070,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
$params['slug'] = array(
|
||||
'description' => __( 'Limit result set to posts with one or more specific slugs.' ),
|
||||
'type' => 'array',
|
||||
'items' => array(
|
||||
'type' => 'string',
|
||||
),
|
||||
'sanitize_callback' => 'wp_parse_slug_list',
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user