Use wp_is_rest_endpoint() to detect if we are handling a REST API request#2094
Use wp_is_rest_endpoint() to detect if we are handling a REST API request#2094mukeshpanchal27 merged 2 commits intotrunkfrom
wp_is_rest_endpoint() to detect if we are handling a REST API request#2094Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #2094 +/- ##
=======================================
Coverage 67.18% 67.18%
=======================================
Files 93 93
Lines 7750 7750
=======================================
Hits 5207 5207
Misses 2543 2543
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Summary
Follow-up to #1206 implementation:
We bumped the WordPress minimum version to 6.6 in #1683, so in
perflab_rest_post_dispatch_add_server_timing(), we can now safely use the core WordPress functionwp_is_rest_endpoint ()mentioned in the TODO comment.In the PR i update the code to use that function and remove the TODO.
Relevant technical choices