You are here

function hotjar_update_7001 in Hotjar 7

Same name and namespace in other branches
  1. 6 hotjar.install \hotjar_update_7001()

Merge Hotjar variables.

File

./hotjar.install, line 17
Contains install, update and uninstall functions for Hotjar module.

Code

function hotjar_update_7001() {
  $variables = array(
    'hotjar_account',
    'hotjar_visibility_pages',
    'hotjar_pages',
    'hotjar_visibility_roles',
    'hotjar_roles',
  );
  $variable = array();
  foreach ($variables as $name) {
    $variable[$name] = variable_get($name);
  }
  variable_set('hotjar_settings', $variable);

  // Delete old variables.
  foreach ($variables as $name) {
    variable_del($name);
  }
}