Usage
PHP
nebula()->is_ajax_request()
Parameters
This function does not accept any parameters. Is this incorrect?
Source File
Located in /libs/Utilities/Utilities.php on line 1439.
No Hooks
This function does not have any filters or actions available. Request one?
PHP
public function is_ajax_request(){
if ( wp_doing_ajax() ){
return true;
}
if ( !empty($this->super->server['HTTP_X_REQUESTED_WITH']) && strtolower($this->super->server['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' ){
return true;
}
if ( !empty($this->super->server['REQUEST_URI']) ){
if ( str_contains($this->super->server['REQUEST_URI'], '-ajax=') ){
return true;
}
if ( str_contains($this->super->server['REQUEST_URI'], 'ajax.php') ){
return true;
}
if ( str_contains($this->super->server['REQUEST_URI'], 'action=health-check') ){
return true;
}
}
return false;
}
Override
This function can not be short-circuited with an override filter. Request one?