Skip to content

Commit 5b56e73

Browse files
Use wp_is_rest_endpoint()
1 parent e6f4f18 commit 5b56e73

File tree

1 file changed

+1
-1
lines changed
  • plugins/performance-lab/includes/server-timing

1 file changed

+1
-1
lines changed

plugins/performance-lab/includes/server-timing/hooks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
function perflab_rest_post_dispatch_add_server_timing( $response ) {
2525
// 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 ) {
26+
if ( ! wp_is_rest_endpoint() || ! $response instanceof WP_REST_Response ) {
2727
return $response;
2828
}
2929

0 commit comments

Comments
 (0)