WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about rest_post_dispatch

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/rest-api.php apply_filters 2888 /**
* Append result of internal request to REST API for purpose of preloading data to be attached to a page.
* Expected to be called in the context of `array_reduce`.
*
* @since 5.0.0
*
* @param array $memo Reduce accumulator.
* @param string $path REST API path to preload.
* @return array Modified reduce accumulator.
*/
wp-includes/rest-api/class-wp-rest-server.php apply_filters 465 /**
* Filters the REST API response.
*
* Allows modification of the response before returning.
*
* @since 4.4.0
* @since 4.5.0 Applied to embedded responses.
*
* @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
* @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 731 /**
* Embeds the links from the data into the request.
*
* @since 4.4.0
* @since 5.4.0 The $embed parameter can now contain a list of link relations to include.
*
* @param array $data Data from the request.
* @param bool|string[] $embed Whether to embed all links or a filtered list of link relations.
* @return array {
* Data with sub-requests embedded.
*
* @type array $_links Links.
* @type array $_embedded Embedded objects.
* }
*/
wp-includes/rest-api/class-wp-rest-server.php apply_filters 1716 /**
* 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
WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
WP_REST_Server $server Server instance.
WP_REST_Request $request Request used to generate the response.
WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
WP_REST_Server $server Server instance.
WP_REST_Request $request Request used to generate the response.
WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.
WP_REST_Server $server Server instance.
WP_REST_Request $request Request used to generate the response.