You are here

function lightbox2_update_6002 in Lightbox2 8

Same name and namespace in other branches
  1. 6 lightbox2.install \lightbox2_update_6002()
  2. 7.2 lightbox2.install \lightbox2_update_6002()
  3. 7 lightbox2.install \lightbox2_update_6002()

'lightbox2_slideshow_pause_on_previous_click' was mis-named as 'lightbox2_slideshow_pause_on_prev_click'.

File

./lightbox2.install, line 191
Installation functions for Lightbox2.

Code

function lightbox2_update_6002() {
  $vars = variable_init();
  if (array_key_exists('lightbox2_slideshow_pause_on_prev_click', $vars)) {
    $value = $vars['lightbox2_slideshow_pause_on_prev_click'];
    \Drupal::configFactory()
      ->getEditable('lightbox2.settings')
      ->set('lightbox2_slideshow_pause_on_previous_click', $value)
      ->save();
    \Drupal::config('lightbox2.settings')
      ->clear('lightbox2_slideshow_pause_on_prev_click')
      ->save();
  }
  return array();
}