You are here

function context_mobile_detect_boot in Context Mobile Detect 7.2

Same name and namespace in other branches
  1. 7 context_mobile_detect.module \context_mobile_detect_boot()

Implements hook_boot().

File

./context_mobile_detect.module, line 162

Code

function context_mobile_detect_boot() {
  $data = _context_mobile_detect_detect(TRUE);
  if ($data['device'] < 3 && $data['device'] > 0) {
    drupal_add_http_header('X-Mobile-Device', $data['device']);
    drupal_add_http_header('X-Mobile-Device-Type', $data['device_type']);
  }
}