You are here

function slick_update_7008 in Slick Carousel 7.2

Removed HTML tags from arrows due to translation issue as per #3075838.

File

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

Code

function slick_update_7008() {
  module_load_include('inc', 'slick', 'includes/slick.admin');

  // Configuration translation disallowed HTML.
  // See https://drupal.org/node/3075838
  foreach (slick_optionset_load_all() as &$optionset) {
    foreach (array(
      'prevArrow',
      'nextArrow',
    ) as $key) {

      // Don't bother with Optimized ON, as arrows are removed already.
      if ($value = $optionset->options['settings'][$key]) {
        $optionset->options['settings'][$key] = trim(strip_tags($value));
      }
    }
    ctools_export_crud_save('slick_optionset', $optionset);
  }

  // Rebuild CTools cache for the slick_optionset.
  ctools_export_load_object_reset('slick_optionset');
}