You are here

function _jquery_carousel_settings_format in jQuery carousel 8

Same name and namespace in other branches
  1. 7 jquery_carousel.module \_jquery_carousel_settings_format()

Helper function to prepare the settings to be exposed in JS.

Helps convert boolean 1s & 0s into boolean strings

2 calls to _jquery_carousel_settings_format()
template_preprocess_jquery_carousel_field_formatter in ./jquery_carousel.module
Theme callback for jQuery carousel field formatter.
template_preprocess_views_view_jquery_carousel in ./jquery_carousel.module
Prepares variables for views jquery_carousel templates.

File

./jquery_carousel.module, line 266
Provide jquery carousel style plugin for views.

Code

function _jquery_carousel_settings_format(&$settings) {
  $carousel_form = jquery_carousel_config_form();
  foreach (array_keys($settings) as $key) {
    if (isset($carousel_form[$key]['#boolean']) && $carousel_form[$key]['#boolean']) {
      $settings[$key] = (bool) $settings[$key];
    }
  }
}