You are here

function jquery_update_update_7001 in jQuery Update 7.3

Convert jquery_update_jquery_admin_version to an admin theme setting.

File

./jquery_update.install, line 79
Install file for jQuery Update.

Code

function jquery_update_update_7001() {

  // Detect if the previous feature of the "admin version" variable is set.
  // @see https://www.drupal.org/node/1969244
  $admin_theme = variable_get('admin_theme', FALSE);
  $admin_version = variable_get('jquery_update_jquery_admin_version', 'default');

  // Ensure that if "seven" is set as the admin theme and no "admin version"
  // is present, the version used on the admin theme is the "default" core
  // provides to ensure major compatibility with contrib modules.
  if (!$admin_version && $admin_theme === 'seven') {
    $admin_version = 'default';
  }
  elseif (!$admin_version) {
    return;
  }

  // Continue setting the admin theme jQuery version.
  _jquery_update_set_theme_version($admin_theme, $admin_version);

  // Remove the admin version variable.
  variable_del('jquery_update_jquery_admin_version');
}