Yoast\WP\SEO\Helpers

Request_Helper{}Yoast 1.0

A helper object for the request state.

Хуков нет.

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

$Request_Helper = new Request_Helper();
// use class methods

Методы

  1. public is_rest_request()

Код Request_Helper{} Yoast 19.7.1

class Request_Helper {

	/**
	 * Checks if the current request is a REST request.
	 *
	 * @return bool True when the current request is a REST request.
	 */
	public function is_rest_request() {
		return \defined( 'REST_REQUEST' ) && \REST_REQUEST === true;
	}
}