function _hotjar_access in Hotjar 7
Determines whether we add tracking code to page.
1 call to _hotjar_access()
- hotjar_page_build in ./
hotjar.module - Implements hook_page_build().
File
- ./
hotjar.module, line 129 - Drupal Module: Hotjar.
Code
function _hotjar_access() {
$settings = hotjar_get_settings();
$id = $settings['hotjar_account'];
$access = array(
'hotjar_id' => (bool) $id,
'hotjar_status' => _hotjar_check_status(),
'hotjar_path' => _hotjar_should_be_added(),
'hotjar_role' => _hotjar_check_user(),
);
foreach (module_implements('hotjar_access') as $module) {
$access[$module] = module_invoke($module, 'hotjar_access');
}
drupal_alter('hotjar_access', $access);
return !in_array(HOTJAR_ACCESS_DENY, $access, TRUE);
}