wp_is_rest_endpoint
wp_is_rest_endpoint ( No parameters )
Returns:- (bool) True if a REST endpoint request is currently being handled, false otherwise.
Defined at: - Introduced in WordPress: 6.5.0
- Deprecated in WordPress: —
Description
Checks whether a REST API endpoint request is currently being handled.This may be a standalone REST API request, or an internal request dispatched from within a regular page load.