function context_mobile_detect_boot in Context Mobile Detect 7
Same name and namespace in other branches
- 7.2 context_mobile_detect.module \context_mobile_detect_boot()
Implements hook_boot().
File
- ./
context_mobile_detect.module, line 129
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']);
}
}