function eu_cookie_compliance_requirements in EU Cookie Compliance (GDPR Compliance) 7
Same name and namespace in other branches
- 8 eu_cookie_compliance.install \eu_cookie_compliance_requirements()
- 7.2 eu_cookie_compliance.install \eu_cookie_compliance_requirements()
- 2.0.x eu_cookie_compliance.install \eu_cookie_compliance_requirements()
Implements hook_requirements().
File
- ./
eu_cookie_compliance.install, line 100 - Installation file.
Code
function eu_cookie_compliance_requirements($phase) {
$requirements = array();
if ($phase === 'runtime') {
module_load_include('module', 'eu_cookie_compliance', 'eu_cookie_compliance');
$settings = eu_cookie_compliance_get_settings();
if (!empty($settings['popup_link']) && $settings['popup_link'] === '<front>' && !empty($settings['show_disagree_button']) && $settings['show_disagree_button']) {
$requirements['eu_cookie_compliance'] = array(
'title' => t('EU Cookie Compliance'),
'severity' => REQUIREMENT_ERROR,
'description' => t('Your privacy policy link is pointing at the front page. This is the default value after installation, and unless your privacy policy is actually posted at the front page, you will need to create a separate page for the privacy policy and link to that page.'),
'value' => t('Privacy Policy link not provided'),
);
}
}
return $requirements;
}