popsu-d7/sites/all/modules/jquery_update/jquery_update.install
Bachir Soussi Chiadmi 1bc61b12ad first import
2015-04-08 11:40:19 +02:00

48 lines
1.1 KiB
Plaintext

<?php
/**
* @file
* Install file for jQuery Update.
*/
/**
* Implementation of hook_requirements().
*/
function jquery_update_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$t = get_t();
$jquery = drupal_get_library('system', 'jquery');
$ui = drupal_get_library('system', 'ui');
$requirements['jquery_update'] = array(
'title' => $t('jQuery Update'),
'severity' => REQUIREMENT_OK,
'value' => t('jQuery %jquery and jQuery UI %ui', array('%jquery' => $jquery['version'], '%ui' => $ui['version'])),
);
}
return $requirements;
}
/**
* Implementation of hook_uninstall().
*/
function jquery_update_uninstall() {
variable_del('jquery_update_compression_type');
variable_del('jquery_update_jquery_version');
}
/**
* Update from Drupal 6.
*/
function jquery_update_update_7000() {
if (variable_get('jquery_update_compression_type', 'min') == 'pack') {
variable_set('jquery_update_compression_type', 'min');
}
variable_del('jquery_update_replace');
// Restore the default version of jQuery.
variable_del('jquery_update_jquery_version');
}