Tribe__Context::doing_rest()
Checks whether the current request is a REST API one or not.
Return
(bool) Whether the current request is a REST API one or not.
Source
File: src/Tribe/Context.php
public function doing_rest() {
return defined( 'REST_REQUEST' ) && REST_REQUEST;
}
Changelog
| Version | Description |
|---|---|
| 4.9.20 | Introduced. |