- Timestamp:
- 10/26/2023 10:34:41 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r56834 r57012 468 468 469 469 /** 470 * Filters whether the REST API request has already been served.471 *472 * Allow sending the request manually - by returning true, the API result473 * will not be sent to the client.474 *475 * @since 4.4.0476 *477 * @param bool $served Whether the request has already been served.478 * Default false.479 * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`.480 * @param WP_REST_Request $request Request used to generate the response.481 * @param WP_REST_Server $server Server instance.482 */483 $served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this );484 485 /**486 470 * Filters whether to send nocache headers on a REST API request. 487 471 * … … 504 488 } 505 489 } 490 491 /** 492 * Filters whether the REST API request has already been served. 493 * 494 * Allow sending the request manually - by returning true, the API result 495 * will not be sent to the client. 496 * 497 * @since 4.4.0 498 * 499 * @param bool $served Whether the request has already been served. 500 * Default false. 501 * @param WP_HTTP_Response $result Result to send to the client. Usually a `WP_REST_Response`. 502 * @param WP_REST_Request $request Request used to generate the response. 503 * @param WP_REST_Server $server Server instance. 504 */ 505 $served = apply_filters( 'rest_pre_serve_request', false, $result, $request, $this ); 506 506 507 507 if ( ! $served ) {
Note: See TracChangeset
for help on using the changeset viewer.