rest_handle_options_request( mixed $response, WP_REST_Server $handler, WP_REST_Request $request )
Handles OPTIONS requests for the server.
Shortcut: rhor
You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.
This is handled outside of the server code, as it doesn't obey normal route mapping.
Name | Type(s) | Default Value | Description |
---|---|---|---|
$response |
mixed
| Current response, either response or |
|
$handler |
WP_REST_Server
| ResponseHandler instance (usually WP_REST_Server). |
|
$request |
WP_REST_Request
| The request that was used to make current response. |
Modified response, either response or null
to indicate pass-through.