DescriptionDescription
This action is fired before the REST route proceeds the response callback.
It allows to bypasses the requested response.
ArgumentsArguments
Argument | Type | Description |
$request | WP_REST_Request | Generated request object |
$params | array | Holds requested parameters |
ExampleExample
PHP
functions.php
function prefix_rest_api_callback( $request, $params ) {
// Return an earlier response.
rest_ensure_response( [...] );
}
add_action( 'wp_grid_builder/rest_api/callback', 'prefix_rest_api_callback', 10, 2 );