WP_REST_Server::is_dispatching()publicWP 6.5.0

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.

Метод класса: WP_REST_Server{}

Хуков нет.

Возвращает

true|false. Whether the REST server is currently handling a request.

Использование

$WP_REST_Server = new WP_REST_Server();
$WP_REST_Server->is_dispatching();

Список изменений

С версии 6.5.0 Введена.

Код WP_REST_Server::is_dispatching() WP 6.7.1

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