-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
priority: normalThe issue/PR is normal priority—not many people are affected or there’s a workaround, etc.The issue/PR is normal priority—not many people are affected or there’s a workaround, etc.
Description
User story
In WordPress 6.5 a new helper function wp_is_serving_rest_request
is introduced. For better reliability we should make use of this function.
See: https://core.trac.wordpress.org/changeset/57312
We have one location in the code where we use the old method defined( 'REST_REQUEST' ) && REST_REQUEST
Since we support WordPress L-2 we'll have to make it conditional and fallback to the old method if wp_is_serving_rest_request
is not available. But we might as well start using the newer method as it might be more reliable since it's filterable. Edit: Final version is not filterable, so there are less benefits in using the helper function.
Metadata
Metadata
Assignees
Labels
priority: normalThe issue/PR is normal priority—not many people are affected or there’s a workaround, etc.The issue/PR is normal priority—not many people are affected or there’s a workaround, etc.