W3cubDocs

/WordPress

WP_REST_Server::is_dispatching(): bool

Returns whether the REST server is currently dispatching / responding to a request.

Description

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

Return

bool Whether the REST server is currently handling a request.

Source

public function is_dispatching() {
	return (bool) $this->dispatching_requests;
}

Changelog

Version Description
6.5.0 Introduced.

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