We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 22e1f6f + f559f15 commit ee52a02Copy full SHA for ee52a02
plugins/performance-lab/includes/server-timing/hooks.php
@@ -22,8 +22,7 @@
22
* @return WP_REST_Response|WP_Error Filtered response.
23
*/
24
function perflab_rest_post_dispatch_add_server_timing( $response ) {
25
- // TODO: Change condition to use wp_is_rest_endpoint() once minimum-supported version is WordPress 6.5.
26
- if ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST || ! $response instanceof WP_REST_Response ) {
+ if ( ! wp_is_rest_endpoint() || ! $response instanceof WP_REST_Response ) {
27
return $response;
28
}
29
0 commit comments