W3cubDocs

/WordPress

apply_filters( ‘wp_is_rest_endpoint’, bool $is_request_endpoint )

Filters whether a REST endpoint request is currently being handled.

Description

This may be a standalone REST API request, or an internal request dispatched from within a regular page load.

Parameters

$is_request_endpointbool
Whether a REST endpoint request is currently being handled.

Source

return (bool) apply_filters( 'wp_is_rest_endpoint', $is_rest_endpoint );

Changelog

Version Description
6.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_is_rest_endpoint