diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php
index 11b8897..2ec8ccd 100644
a
|
b
|
class WP_REST_Server { |
387 | 387 | // Embed links inside the request. |
388 | 388 | $result = $this->response_to_data( $result, isset( $_GET['_embed'] ) ); |
389 | 389 | |
| 390 | /** |
| 391 | * Filters the API response. |
| 392 | * |
| 393 | * Allows modification of the response data after inserting |
| 394 | * embedded data (if any) and before echoing the response data. |
| 395 | * |
| 396 | * @since 4.8.1 |
| 397 | * |
| 398 | * @param array $result Response data to send to the client. |
| 399 | * @param WP_REST_Server $this Server instance. |
| 400 | * @param WP_REST_Request $request Request used to generate the response. |
| 401 | */ |
| 402 | $result = apply_filters( 'rest_pre_echo_response', $result, $this, $request ); |
| 403 | |
390 | 404 | $result = wp_json_encode( $result ); |
391 | 405 | |
392 | 406 | $json_error_message = $this->get_json_last_error(); |