function _eu_cookie_compliance_get_script_key in EU Cookie Compliance (GDPR Compliance) 7
Find the array key that holds the disabled script loader.
Parameters
array $javascript: The javascripts.
Return value
int|bool The array key where the script loader lives, FALSE if not found.
1 call to _eu_cookie_compliance_get_script_key()
- eu_cookie_compliance_js_alter in ./
eu_cookie_compliance.module - Implements hook_js_alter().
File
- ./
eu_cookie_compliance.module, line 800 - EU cookie compliance primary module file.
Code
function _eu_cookie_compliance_get_script_key($javascript) {
foreach ($javascript as $key => $script) {
if (!empty($script['data']) && !is_array($script['data']) && strpos($script['data'], 'window.euCookieComplianceLoadScripts') !== FALSE) {
return $key;
}
}
return FALSE;
}