'~!', // horizontal, vertical, or fade (default: horizontal)
'speed' => '~!', // slide transition duration (ms) (default: 500)
'slideMargin' => '~!', // Margin between each slide (default: 0)
'startSlide' => '~!', // Starting slide index (zero-based, default: 0)
'randomStart' => '~!', // Start slider on a random slide (true/false) (default: false)
'infiniteLoop' => '~!', // If true, clicking "Next" while on the last slide will transition to the first
// slide and vice-versa (default: true)
'hideControlOnEnd' => '~!', // If true, "Next" control will be hidden on last slide and vice-versa
// Note: Only used when infiniteLoop: false
'easing' => '~!', // The type of "easing" to use during transitions.
// Options: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'cubic-bezier(n,n,n,n)'
'captions' => '~!', // Include image captions. Captions are derived from the image's title attribute
// (true/false) (default: false)
'ticker' => '~!', // Use slider in ticker mode (similar to a news ticker) (true/false) (default: false)
'tickerHover' => '~!',
'adaptiveHeight' => '~!', // Dynamically adjust slider height based on each slide's height (true/false) (default: false)
'adaptiveHeightSpeed' => '~!',
'video' => '~!', // If any slides contain video, set this to true. (true/false) (default: false)
// See http://fitvidsjs.com/ for more info
'useCSS' => '~!', // use CSS, false. use animate()
'preloadImages' => '~!', // If 'all', preloads all images before starting the slider. If 'visible',
// preloads only images in the initially visible slides before starting the
// slider (tip: use 'visible' if all slides are identical dimensions) (default: visible)
// PAGER
'pager' => '~!', // If true, a pager will be added (true/false)
'pagerCustom' => '~!', // ID of associated pager - include leading #, MUST be in both slider and pager
'pagerType' => '~!', // If 'full', a pager link will be generated for each slide.
// If 'short', a x / y pager will be used (ex. 1 / 5) (default: full)
'pagerShortSeparator' => '~!', // If pagerType: 'short', pager will use this value as the separating character (default: ' / ')
// CONTROLS
'controls' => '~!', // If true, "Next" / "Prev" controls will be added (true/false) (default: true)
'nextSelector' => '~!', // next selector id
'prevSelector' => '~!', // prev selector id
'nextText' => '~!', // Text to be used for the "Next" control (default: 'Next')
'prevText' => '~!', // Text to be used for the "Prev" control (default: 'Prev')
'autoControls' => '~!', // If true, "Start" / "Stop" controls will be added (true/false) (default: false)
'startText' => '~!', // Text to be used for the "Start" control (default: 'Start')
'stopText' => '~!', // Text to be used for the "Stop" control (default: 'Stop')
'autoControlsCombine' => '~!', // When slideshow is playing only "Stop" control is displayed and
// vice-versa (true/false) (default: false)
// AUTO
'auto' => '~!', // Slides will automatically transition (true/false) (default: false)
'pause' => '~!', // The amount of time (in ms) between each auto transition (default: 4000)
'autoStart' => '~!', // Auto show starts playing on load. If false, slideshow will start when the "Start" control is clicked (true/false) (default: true)
'autoDirection' => '~!', // The direction of auto show slide transitions ('next' or 'prev') (default : 'next')
'autoHover' => '~!', // Auto show will pause when mouse hovers over slider (true/false) (default: false)
'autoDelay' => '~!', // Time (in ms) auto show should wait before starting (default: 0)
// CAROUSEL
'minSlides' => '~!', // The minimum number of slides to be shown. Slides will be sized down if carousel
// becomes smaller than the original size. (default: 1)
'maxSlides' => '~!', // The maximum number of slides to be shown. Slides will be sized up if carousel
// becomes larger than the original size. (default: 1)
'moveSlides' => '~!', // The number of slides to move on transition. This value must be >= minSlides,
// and <= maxSlides. If zero (default), the number of fully-visible slides will be used. (default: 0)
'slideWidth' => '~!' // The width of each slide. This setting is required for all horizontal carousels!
// (default: 0, recommended: 940)
);
$code = "\n"; // end of call for this slider
return $code;
}
function atw_sc_slider($args = '', $content) {
extract(shortcode_atts(array(
'id' => '~!', // id for this slider set - default: generated bxslider-n, where n is generated per slider on a page/post
'noborder' => '', // no borders...
'style' => '',
'css' => '~!' // alternate CSS
), $args));
if ($id == '~!') {
$id = 'atw_slider_' . rand();
}
$code = '';
if ($css != '~!')
$code .= atw_slider_gen_css($css, $id);
$retval = trim($content);
$leadbr = strpos($retval, '
');
if ($leadbr !== false && $leadbr == 0) {
$retval = substr($retval, 6);
}
$retval = str_replace('slide]
','slide]',$retval); // strip all the
s added by autop
$retval = str_replace('slider_index]
','slider_index]',$retval);
$code .= atw_slider_gen_script($args,$id);
$after = '';
$before = '';
if ($noborder) {
$before .= '';
}
if ($style != '') {
$before = '