rest_get_endpoint_args_for_schema
rest_get_endpoint_args_for_schema ( $schema, $method = WP_REST_Server::CREATABLE )
Parameters:- (array) schema The full JSON schema for the endpoint.
- (string) method Optional. HTTP method of the endpoint. The arguments for `CREATABLE` endpoints are checked for required values and may fall-back to a given default, this is not done on `EDITABLE` endpoints. Default WP_REST_Server::CREATABLE.
Returns:- (array) The endpoint arguments.
Defined at: - Introduced in WordPress: 5.6.0
- Deprecated in WordPress: —
Description
Retrieves an array of endpoint arguments from the item schema and endpoint method.