You are here

function slick_get_responsive_options in Slick Carousel 7.2

Same name and namespace in other branches
  1. 7.3 includes/slick.admin.inc \slick_get_responsive_options()

Defines a list of options available for the responsive Slick.

Parameters

int $count: The number of breakpoints.

Return value

array A copy of the main options with the removal of problematic options.

1 call to slick_get_responsive_options()
_slick_typecast_optionset in includes/slick.admin.inc
Returns the typecast values, so that JSON object has the right values.

File

includes/slick.admin.inc, line 17
Contains optional functions called only if needed by admin pages.

Code

function slick_get_responsive_options($count = 0) {
  $options = array();
  $breakpoints = drupal_map_assoc(range(0, $count - 1));
  $defaults = slick_get_options();
  foreach ($breakpoints as $key => $breakpoint) {
    $options[$key] = array(
      'breakpoint' => 0,
      'unslick' => FALSE,
      'settings' => array(),
    );
    foreach (slick_clean_options($defaults) as $name => $value) {
      $options[$key]['settings'][$name] = $value;
    }
  }
  return $options;
}