WP_REST_Server::is_dispatching
Returns whether the REST server is currently dispatching / responding to a request.
This may be a standalone REST API request, or an internal request dispatched from within a regular page load.
Method of the class: WP_REST_Server{}
No Hooks.
Returns
true|false. Whether the REST server is currently handling a request.
Usage
$WP_REST_Server = new WP_REST_Server(); $WP_REST_Server->is_dispatching();
Changelog
| Since 6.5.0 | Introduced. |
WP_REST_Server::is_dispatching() WP REST Server::is dispatching code WP 6.9.1
public function is_dispatching() {
return (bool) $this->dispatching_requests;
}