You are here

function flexslider_optionset_save in Flex Slider 7

Same name and namespace in other branches
  1. 7.2 flexslider.module \flexslider_optionset_save()

Saves the given option set to the database. Set the $new flag if this set has not been written before.

File

./flexslider.module, line 232
A light-weight, customizable image gallery plugin for Drupal based on jQuery

Code

function flexslider_optionset_save($optionset, $new = FALSE) {
  $optionset += array(
    'title' => $optionset['name'],
    'options' => _flexslider_optionset_defaults(),
  );
  if ($new) {
    drupal_write_record('flexslider_optionset', $optionset);
  }
  else {
    drupal_write_record('flexslider_optionset', $optionset, 'name');
  }
  return $optionset;
}