You are here

function _jquery_update_set_theme_version in jQuery Update 7.3

Helper function for setting a theme jQuery version during install or update.

Parameters

string $theme_key: The machine name of the theme to set.

string $version: The MAJOR.MINOR jQuery version to set.

2 calls to _jquery_update_set_theme_version()
jquery_update_install in ./jquery_update.install
Implements hook_install().
jquery_update_update_7001 in ./jquery_update.install
Convert jquery_update_jquery_admin_version to an admin theme setting.

File

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

Code

function _jquery_update_set_theme_version($theme_key, $version) {

  // Retrieve the cached theme settings.
  theme_get_setting('jquery_update_jquery_version', $theme_key);
  $theme_settings = drupal_static('theme_get_setting', array());

  // Set the jQuery version.
  $theme_settings[$theme_key]['jquery_update_jquery_version'] = $version;
  variable_set('theme_' . $theme_key . '_settings', $theme_settings[$theme_key]);
}