You are here

function eu_cookie_compliance_update_6100 in EU Cookie Compliance (GDPR Compliance) 6

Same name and namespace in other branches
  1. 5 eu_cookie_compliance.install \eu_cookie_compliance_update_6100()

Implements hook_update_n().

File

./eu_cookie_compliance.install, line 38
Installation file.

Code

function eu_cookie_compliance_update_6100() {
  $popup_settings = array(
    'popup_info' => variable_get('eu_cookie_compliance_popup_info', ''),
    'popup_agreed' => variable_get('eu_cookie_compliance_popup_agreed', ''),
    'popup_link' => variable_get('eu_cookie_compliance_popup_link', ''),
    'popup_height' => variable_get('eu_cookie_compliance_popup_height', 50),
    'popup_width' => variable_get('eu_cookie_compliance_popup_width', '100%'),
    'popup_delay' => variable_get('eu_cookie_compliance_popup_delay', 1),
    'popup_enabled' => variable_get('eu_cookie_compliance_popup_enabled', 0),
    'popup_position' => variable_get('eu_cookie_compliance_popup_position', 0),
  );
  global $language;
  $lang = $language->language ? $language->language : 'en';
  variable_set('eu_cookie_compliance_' . $lang, $popup_settings);
  variable_del('eu_cookie_compliance_popup_info');
  variable_del('eu_cookie_compliance_popup_agreed');
  variable_del('eu_cookie_compliance_popup_link');
  variable_del('eu_cookie_compliance_popup_height');
  variable_del('eu_cookie_compliance_popup_width');
  variable_del('eu_cookie_compliance_popup_delay');
  variable_del('eu_cookie_compliance_popup_enabled');
  variable_del('eu_cookie_compliance_popup_position');
}