function _jquery_ui_filter_set_options in jQuery UI filter 7
Same name and namespace in other branches
- 6 jquery_ui_filter.admin.inc \_jquery_ui_filter_set_options()
Set jQuery UI tabs or accordion options objects.
1 call to _jquery_ui_filter_set_options()
- _jquery_ui_filter_widget_settings_form_submit in ./
jquery_ui_filter.admin.inc - Submit handler; Setting form for the 'jQuery UI filter' module.
File
- ./
jquery_ui_filter.admin.inc, line 172 - Administration pages for the 'jQuery UI filter' module.
Code
function _jquery_ui_filter_set_options($options) {
_jquery_ui_filter_set_options_types_recursive($options);
// Clean up fx options by removing toggle options that are set to 0.
if (isset($options['fx_options'])) {
$options['fx_options'][0] = array_filter($options['fx_options'][0]);
$options['fx_options'][1] = array_filter($options['fx_options'][1]);
}
// Set options object for enabled options (ie fx, cookie, etc...);
foreach ($options as $name => $value) {
if (isset($options[$name . '_options'])) {
if ($value) {
$options[$name] = $options[$name . '_options'];
}
unset($options[$name . '_options']);
}
}
return $options;
}