Helper::is_ajax()
Check if AJAX
Description
Check if an AJAX or REST request has been made.
Return
(bool)
Source
File: includes/libs/helper.class.php
public static function is_ajax(){
$ajax = defined('DOING_AJAX') && DOING_AJAX;
$rest = defined('REST_REQUEST') && REST_REQUEST;
return $ajax || $rest;
}
