Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/rest-api/class-wp-rest-server.php | apply_filters | 983 | /** * Filters the pre-calculated result of a REST API dispatch request. * * Allow hijacking the request before dispatching by returning a non-empty. The returned value * will be used to serve the request instead. * * @since 4.4.0 * * @param mixed $result Response to replace the requested version with. Can be anything * a normal endpoint can return, or null to not hijack the request. * @param WP_REST_Server $server Server instance. * @param WP_REST_Request $request Request used to generate the response. */ |
wp-includes/rest-api/class-wp-rest-server.php | apply_filters | 1688 | /** * Serves the batch/v1 request. * * @since 5.6.0 * * @param WP_REST_Request $batch_request The batch request object. * @return WP_REST_Response The generated response object. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
mixed | $result | Response to replace the requested version with. Can be anything |
WP_REST_Server | $server | Server instance. |
WP_REST_Request | $request | Request used to generate the response. |
mixed | $result | Response to replace the requested version with. Can be anything |
WP_REST_Server | $server | Server instance. |
WP_REST_Request | $request | Request used to generate the response. |