Skip to content

Commit ee52a02

Browse files
Merge branch 'trunk' into add/php-8-4
2 parents 22e1f6f + f559f15 commit ee52a02

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
* @return WP_REST_Response|WP_Error Filtered response.
2323
*/
2424
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 ) {
25+
if ( ! wp_is_rest_endpoint() || ! $response instanceof WP_REST_Response ) {
2726
return $response;
2827
}
2928

0 commit comments

Comments
 (0)