You are here

function flexslider_views_plugin_style_flexslider::options_submit in Flex Slider 7.2

Same name and namespace in other branches
  1. 7 flexslider_views/flexslider_views_plugin_style_flexslider.inc \flexslider_views_plugin_style_flexslider::options_submit()

Performs some cleanup tasks on the options array before saving it.

Overrides views_plugin::options_submit

File

flexslider_views/flexslider_views_plugin_style_flexslider.inc, line 79
flexslider style plugin for the Views module.

Class

flexslider_views_plugin_style_flexslider
Implements a style type plugin for the Views module.

Code

function options_submit(&$form, &$form_state) {
  $options =& $form_state['values']['style_options'];

  // In some cases, namely when the style settings are overriden for this display,
  // the flexslider options aren't in a sub array. No idea why. But this
  // prevents a fatal error.
  if (!empty($options['flexslider'])) {

    // Pull the fieldset values one level up
    $options += $options['flexslider'];
    unset($options['flexslider']);
  }
}