You are here

function eu_cookie_compliance_install in EU Cookie Compliance (GDPR Compliance) 6

Same name and namespace in other branches
  1. 8 eu_cookie_compliance.install \eu_cookie_compliance_install()
  2. 5 eu_cookie_compliance.install \eu_cookie_compliance_install()
  3. 7.2 eu_cookie_compliance.install \eu_cookie_compliance_install()
  4. 7 eu_cookie_compliance.install \eu_cookie_compliance_install()
  5. 2.0.x eu_cookie_compliance.install \eu_cookie_compliance_install()

Implements hook_install().

File

./eu_cookie_compliance.install, line 11
Installation file.

Code

function eu_cookie_compliance_install() {
  $popup_settings = array(
    'popup_info' => array(
      'value' => '<h2>We use cookies on this site to enhance your user experience</h2><p>By clicking any link on this page you are giving your consent for us to set cookies.</p>',
      'format' => FILTER_FORMAT_DEFAULT,
    ),
    'popup_agreed' => array(
      'value' => '<h2>Thank you for accepting cookies</h2><p>You can now hide this message or find out more about cookies.</p>',
      'format' => FILTER_FORMAT_DEFAULT,
    ),
  );
  global $language;
  $lang = $language->language ? $language->language : 'en';
  variable_set('eu_cookie_compliance_' . $lang, $popup_settings);
}