function mobile_detect_page_attachments_alter in Mobile Detect 8.2
Implements hook_page_attachments_alter().
File
- ./
mobile_detect.module, line 69 - Contains mobile_detect.module.
Code
function mobile_detect_page_attachments_alter(array &$attachments) {
if (\Drupal::config('mobile_detect.settings')
->get('mobile_detect_is_mobile')) {
$attachments['#cache']['contexts'][] = 'mobile_detect_is_mobile';
}
}