1 bootstrap.inc backdrop_is_ajax()

Detects if this is an AJAX HTTP request.

File

core/includes/bootstrap.inc, line 4316
Functions that need to be loaded on every Backdrop request.

Code

function backdrop_is_ajax() {
  return !empty($_POST) && !empty($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.backdrop-ajax') === 0;
}