You are here

function _flexslider_optionset_defaults in Flex Slider 7

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

Default settings for a newly created option set

Parameters

string $key [optional]: Specific key to retrieve

Return value

array|string Returns an array of values or the specified value

1 call to _flexslider_optionset_defaults()
flexslider_optionset_save in ./flexslider.module
Saves the given option set to the database. Set the $new flag if this set has not been written before.

File

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

Code

function _flexslider_optionset_defaults($key = NULL) {
  $defaults = array(
    'animation' => 'fade',
    'animationduration' => 6000,
    'slidedirection' => 'horizontal',
    'slideshow' => TRUE,
    'slideshowspeed' => 7000,
    'directionnav' => TRUE,
    'controlnav' => TRUE,
    'keyboardnav' => TRUE,
    'mousewheel' => FALSE,
    'prevtext' => t('Previous'),
    'nexttext' => t('Next'),
    'pauseplay' => FALSE,
    'pausetext' => t('Pause'),
    'playtext' => t('Play'),
    'randomize' => FALSE,
    'slidetostart' => 0,
    // integer value, not boolean
    'animationloop' => TRUE,
    'pauseonaction' => TRUE,
    'pauseonhover' => TRUE,
    'controlscontainer' => '.flex-nav-container',
    'manualcontrols' => '',
    'startcallback' => 'function() {}',
    'beforecallback' => 'function() {}',
    'aftercallback' => 'function() {}',
    'endcallback' => 'function() {}',
  );
  if (isset($key) and array_key_exists($key, $defaults)) {
    return $defaults[$key];
  }
  return $defaults;
}