You are here

function slick_update_7300 in Slick Carousel 7.3

Enable the Blazy module if it is not already enabled.

Tasks:<br>

File

./slick.install, line 155
Installation actions for Slick.

Code

function slick_update_7300() {
  global $conf;
  if (isset($conf['slick_admin_css'])) {
    $values = SlickDefault::formSettings();
    $values['slick_css'] = variable_get('slick_css', TRUE);
    $values['module_css'] = variable_get('slick_module_css', TRUE);

    // Rebuild new merged variables.
    variable_set('slick.settings', $values);

    // Delete old variables.
    variable_del('slick_admin_css');
    variable_del('slick_css');
    variable_del('slick_module_css');
  }

  // Rebuild theme registry.
  drupal_theme_rebuild();

  // Rebuild old Slick UI class registry.
  registry_rebuild();

  // Bail out if Blazy is not available.
  $exists = module_enable([
    'blazy',
  ]);
  if (!$exists) {
    throw new DrupalUpdateException('The <a href="https://drupal.org/project/blazy">Blazy module</a> must be downloaded and available for Slick updates to proceed.');
  }
}