Strong Testimonials - Version 2.32.4

Version Description

  • Dec. 27, 2018 =
  • Prerender shortcodes in WordPress Custom HTML widgets.
Download this release

Release Info

Developer cdillon27
Plugin Icon 128x128 Strong Testimonials
Version 2.32.4
Comparing to
See all releases

Code changes from version 2.32.3 to 2.32.4

changelog.txt CHANGED
@@ -1,3 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 2.30.9 - May 6, 2018 =
2
  * Fix bug in add-on activation process.
3
 
1
+ = 2.31.10 - Aug 2, 2018 =
2
+ * Fix singular/plural phrases in testimonial average shortcode.
3
+ * Fix bug in scroll to success message.
4
+ * Fix RTL slider controls.
5
+ * Attempt to fix slider touch problems in iOS.
6
+
7
+ = 2.31.9 - July 17, 2018 =
8
+ * Fix compatbility issue with Gutenberg.
9
+ * Fix bug in average rating calculation.
10
+ * Fix CSS columns for recent browser updates.
11
+ * Fix bug in lazy-loading compatibility option.
12
+ * Improve theme compatibility.
13
+ * Add filter on form submit button CSS class.
14
+
15
+ = 2.31.8 - June 16, 2018 =
16
+ * Fix "wait" spinner in unstyled form template.
17
+ * On forms, only show required symbol if field label is shown.
18
+ * Refactor inline style method.
19
+ * Improve exception handling.
20
+
21
+ = 2.31.7 - June 7, 2018 =
22
+ * Fix JavaScript incompatibility in IE and Edge.
23
+
24
+ = 2.31.6 - June 2, 2018 =
25
+ * Fix bug when adding a custom field in view editor.
26
+
27
+ = 2.31.5 - June 1, 2018 =
28
+ * Fix XSS vulnerablilities reported by DefenseCode using Thunderscan.
29
+ * Add spinner UI element while form is being submitted to deter visitor from navigating away.
30
+ * Minor admin UI improvements.
31
+
32
+ = 2.31.4 - May 22, 2018 =
33
+ * Add integration with WordPress privacy exporter and eraser features.
34
+
35
+ = 2.31.3 - May 19, 2018 =
36
+ * Fix missing submit button.
37
+
38
+ = 2.31.2 - May 18, 2018 =
39
+ * Fix bug in average rating half-star.
40
+
41
+ = 2.31.1 - May 15, 2018 =
42
+ * Fix conflict with Review Markup add-on.
43
+
44
+ = 2.31 - May 15, 2018 =
45
+ * Add `[testimonial_average_rating]` shortcode.
46
+ * Add compatibility option for script controller.
47
+ * Add compatibility option for lazy loading images.
48
+ * Minor template style tweaks for small screens.
49
+ * Use empty star icon instead of full icon in different color.
50
+ * Change default message "Required field" to "Required".
51
+ * Improve exception handling.
52
+ * Improve Pjax compatibility.
53
+ * Apply JavaScript coding standard.
54
+ * Add console logging for slider when `SCRIPT_DEBUG` enabled.
55
+ * Minor admin style tweaks.
56
+
57
  = 2.30.9 - May 6, 2018 =
58
  * Fix bug in add-on activation process.
59
 
includes/class-strong-testimonials-render.php CHANGED
@@ -399,8 +399,8 @@ class Strong_Testimonials_Render {
399
  }
400
 
401
  foreach ( $widgets as $key => $widget_name ) {
402
- // Is our widget active?
403
  if ( 0 === strpos( $widget_name, 'strong-testimonials-view-widget-' ) ) {
 
404
 
405
  if ( $strong_widgets ) {
406
  $name_parts = explode( '-', $widget_name );
@@ -414,6 +414,7 @@ class Strong_Testimonials_Render {
414
  }
415
 
416
  } elseif ( 0 === strpos( $widget_name, 'text-' ) ) {
 
417
 
418
  // Get text widget content to scan for shortcodes.
419
  $text_widgets = get_option( 'widget_text' );
@@ -428,6 +429,22 @@ class Strong_Testimonials_Render {
428
  }
429
  }
430
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
  } // foreach $widgets
433
  } // foreach $all_widgets
399
  }
400
 
401
  foreach ( $widgets as $key => $widget_name ) {
 
402
  if ( 0 === strpos( $widget_name, 'strong-testimonials-view-widget-' ) ) {
403
+ // Our plugin widget
404
 
405
  if ( $strong_widgets ) {
406
  $name_parts = explode( '-', $widget_name );
414
  }
415
 
416
  } elseif ( 0 === strpos( $widget_name, 'text-' ) ) {
417
+ // Text widgets
418
 
419
  // Get text widget content to scan for shortcodes.
420
  $text_widgets = get_option( 'widget_text' );
429
  }
430
  }
431
 
432
+ } elseif ( 0 === strpos( $widget_name, 'custom_html-' ) ) {
433
+ // Custom HTML widgets
434
+
435
+ // Get text widget content to scan for shortcodes.
436
+ $custom_html_widgets = get_option( 'widget_custom_html' );
437
+
438
+ if ( $custom_html_widgets ) {
439
+ $name_parts = explode( '-', $widget_name );
440
+ $id = array_pop( $name_parts );
441
+
442
+ if ( isset( $custom_html_widgets[ $id ] ) ) {
443
+ $widget = $custom_html_widgets[ $id ];
444
+ $this->process_content( $widget['content'] );
445
+ }
446
+ }
447
+
448
  }
449
  } // foreach $widgets
450
  } // foreach $all_widgets
includes/functions-template.php CHANGED
@@ -590,6 +590,7 @@ if ( ! function_exists( 'wpmtst_single_template_client' ) ) :
590
  * @since 2.22.0
591
  */
592
  function wpmtst_single_template_client() {
 
593
  $view = wpmtst_find_single_template_view();
594
  if ( $view && isset( $view['client_section'] ) ) {
595
  foreach ( $view['client_section'] as $field ) {
@@ -598,7 +599,12 @@ if ( ! function_exists( 'wpmtst_single_template_client' ) ) :
598
  break;
599
  }
600
  }
601
- echo wpmtst_client_section( $view['client_section'] );
 
 
 
602
  }
 
 
603
  }
604
  endif;
590
  * @since 2.22.0
591
  */
592
  function wpmtst_single_template_client() {
593
+ $html = '';
594
  $view = wpmtst_find_single_template_view();
595
  if ( $view && isset( $view['client_section'] ) ) {
596
  foreach ( $view['client_section'] as $field ) {
599
  break;
600
  }
601
  }
602
+
603
+ $html .= '<div class="testimonial-client normal">';
604
+ $html .= wpmtst_client_section( $view['client_section'] );
605
+ $html .= '</div>';
606
  }
607
+
608
+ return $html;
609
  }
610
  endif;
includes/functions.php CHANGED
@@ -673,15 +673,7 @@ function wpmtst_divi_builder_active() {
673
  */
674
  function wpmtst_single_template_add_content( $content ) {
675
  if ( is_singular( 'wpm-testimonial' ) || is_tax( 'wpm-testimonial-category' ) ) {
676
- ob_start();
677
- ?>
678
- <div class="testimonial-client normal">
679
- <?php wpmtst_single_template_client(); ?>
680
- </div>
681
- <?php
682
- $html = ob_get_contents();
683
- ob_end_clean();
684
- $content .= $html;
685
  }
686
 
687
  return $content;
673
  */
674
  function wpmtst_single_template_add_content( $content ) {
675
  if ( is_singular( 'wpm-testimonial' ) || is_tax( 'wpm-testimonial-category' ) ) {
676
+ $content .= wpmtst_single_template_client();
 
 
 
 
 
 
 
 
677
  }
678
 
679
  return $content;
public/js/lib/strongslider/jquery.strongslider.js CHANGED
@@ -175,7 +175,6 @@
175
  // store if the slider is in carousel mode (displaying / moving multiple slides)
176
  setBreakpoint();
177
  // slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
178
- console.log('init',slider.carousel);
179
 
180
  // if carousel, force preloadImages = 'all'
181
  if (slider.carousel) {
175
  // store if the slider is in carousel mode (displaying / moving multiple slides)
176
  setBreakpoint();
177
  // slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
 
178
 
179
  // if carousel, force preloadImages = 'all'
180
  if (slider.carousel) {
public/js/lib/strongslider/jquery.strongslider.min.js CHANGED
@@ -1 +1 @@
1
- (function($){var defaults={debug:false,logAs:"strongSlider",compat:{lazyload:{active:false,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:true,hideControlOnEnd:false,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:false,captions:false,adaptiveHeight:false,adaptiveHeightSpeed:500,video:false,useCSS:true,preloadImages:"visible",responsive:true,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:false,imagesLoaded:true,touchEnabled:true,swipeThreshold:50,oneToOneTouch:true,preventDefaultSwipeX:true,preventDefaultSwipeY:false,ariaLive:true,ariaHidden:true,keyboardEnabled:false,pager:true,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:true,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:false,startText:"Start",stopText:"Stop",autoControlsCombine:false,autoControlsSelector:null,auto:true,pause:4e3,autoStart:true,autoDirection:"next",stopAutoOnClick:false,autoHover:false,autoDelay:0,autoSlideForOnePage:false,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return true},onSlideBefore:function(){return true},onSlideAfter:function(){return true},onSlideNext:function(){return true},onSlidePrev:function(){return true},onSliderResize:function(){return true},onAutoChange:function(){return true}};$.fn.strongSlider=function(options){if(this.length===0){return this}var slider={},viewEl=this,el=this.find(".wpmslider-content");if($(el).data("strongSlider")){return}var init=function(){if($(el).data("strongSlider")){return}slider.visibilityInterval=0;slider.hidden=false;var sliderVar=viewEl.data("slider-var");var config={};if(typeof window[sliderVar]!=="undefined"){config=window[sliderVar].config}slider.settings=$.extend({},defaults,config,options);slider.debug=slider.settings.debug;slider.logAs=slider.settings.logAs;if(slider.debug)console.log(slider.logAs,"slider.settings",slider.settings);slider.children=el.children(slider.settings.slideSelector);if(slider.children.length<slider.settings.minSlides){slider.settings.minSlides=slider.children.length}if(slider.children.length<slider.settings.maxSlides){slider.settings.maxSlides=slider.children.length}if(slider.settings.randomStart){slider.settings.startSlide=Math.floor(Math.random()*slider.children.length)}slider.active={index:slider.settings.startSlide};setBreakpoint();console.log("init",slider.carousel);if(slider.carousel){slider.settings.preloadImages="all"}slider.working=false;slider.controls={};slider.interval=null;slider.animProp=slider.settings.mode==="vertical"?"top":"left";slider.usingCSS=slider.settings.useCSS&&slider.settings.mode!=="fade"&&function(){var div=document.createElement("div"),props=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i=0;i<props.length;i++){if(div.style[props[i]]!==undefined){slider.cssPrefix=props[i].replace("Perspective","").toLowerCase();slider.animProp="-"+slider.cssPrefix+"-transform";return true}}return false}();if(slider.settings.mode==="vertical"){slider.settings.maxSlides=slider.settings.minSlides}el.data("origStyle",el.attr("style"));el.children(slider.settings.slideSelector).each(function(){$(this).data("origStyle",$(this).attr("style"))});if(!el.getSlideCount()){return}if(slider.settings.imagesLoaded){viewEl.imagesLoaded(function(){initVisibilityCheck()})}else{initVisibilityCheck()}};var reallyVisible=function(){return viewEl.is(":visible")&&viewEl.css("visibility")!=="hidden"};var compatCheck=function(){if(slider.settings.compat.lazyload){var inProgress=false;for(var i=0,len=slider.settings.compat.lazyload.classes.length;i<len;i++){var startClass=slider.settings.compat.lazyload.classes[i].start;var finishClass=slider.settings.compat.lazyload.classes[i].finish;if(startClass&&finishClass){if(viewEl.find("img."+startClass).length&&!viewEl.find("img."+finishClass).length){inProgress=true}}else if(startClass){if(viewEl.find("img."+startClass).length){inProgress=true}}else if(finishClass){if(!viewEl.find("img."+finishClass).length){inProgress=true}}}if(inProgress){if(slider.debug)console.log(slider.logAs,"lazy loading...");return false}}if(slider.debug)console.log(slider.logAs,"compat check complete");return true};var initVisibilityCheck=function(){if(reallyVisible()&&compatCheck()){clearInterval(slider.visibilityInterval);setup()}else{if(slider.visibilityInterval===0){slider.visibilityInterval=setInterval(initVisibilityCheck,1e3*4)}}};var setup=function(){var preloadSelector=slider.children.eq(slider.settings.startSlide);el.wrap('<div class="'+slider.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>');slider.viewport=el.parent();if(slider.settings.ariaLive){slider.viewport.attr("aria-live","polite")}slider.loader=$('<div class="wpmslider-loading" />');slider.viewport.prepend(slider.loader);el.css({width:slider.settings.mode==="horizontal"?slider.children.length*1e3+215+"%":"auto",position:"relative"});if(slider.usingCSS&&slider.settings.easing){el.css("-"+slider.cssPrefix+"-transition-timing-function",slider.settings.easing)}else if(!slider.settings.easing){slider.settings.easing="swing"}slider.viewport.css({width:"100%",overflow:"hidden",position:"relative"});slider.viewport.parent().css({maxWidth:getViewportMaxWidth2()});if(!slider.settings.pager&&!slider.settings.controls){slider.viewport.parent().css({margin:"0 auto"})}slider.children.css({float:slider.settings.mode==="horizontal"?"left":"none",listStyle:"none",position:"relative"});updateWidth();if(slider.settings.mode==="horizontal"&&slider.settings.slideMargin>0){slider.children.css("marginRight",slider.settings.slideMargin)}if(slider.settings.mode==="vertical"&&slider.settings.slideMargin>0){slider.children.css("marginBottom",slider.settings.slideMargin)}if(slider.settings.mode==="fade"){slider.children.css({position:"absolute",zIndex:0,display:"none"});slider.children.eq(slider.settings.startSlide).css({zIndex:slider.settings.slideZIndex,display:"block"})}else{slider.children.css({display:"block"})}slider.controls.el=$('<div class="wpmslider-controls" />');if(slider.settings.captions){appendCaptions()}slider.active.last=slider.settings.startSlide===getPagerQty()-1;if(slider.settings.video){el.fitVids()}if(slider.settings.preloadImages==="none"){preloadSelector=null}else if(slider.settings.preloadImages==="all"){preloadSelector=slider.children}if(slider.settings.controls){appendControlPrev()}if(slider.settings.auto&&slider.settings.autoControls){appendControlsAuto()}if(slider.settings.pager){appendPager()}if(slider.settings.controls){appendControlNext()}if(slider.settings.controls||slider.settings.autoControls||slider.settings.pager){slider.viewport.after(slider.controls.el)}if(preloadSelector===null){start()}else{loadElements(preloadSelector,start)}};var setBreakpoint=function(){if(slider.debug)console.log(slider.logAs,"setBreakpoint");var currentBreakpoint=slider.settings.breakpoints.single;var breakpoints=slider.settings.breakpoints.multiple;if(slider.settings.type==="show_multiple"){for(var key in breakpoints){if(breakpoints.hasOwnProperty(key)){if(verge.viewportW()>=breakpoints[key].width){currentBreakpoint=breakpoints[key];break}}}}if(slider.debug)console.log("current breakpoint",currentBreakpoint);slider.settings.maxSlides=currentBreakpoint.maxSlides;slider.settings.moveSlides=currentBreakpoint.moveSlides;slider.settings.slideMargin=currentBreakpoint.slideMargin;slider.carousel=slider.settings.minSlides>1||slider.settings.maxSlides>1};var updateWidth=function(){setBreakpoint();slider.children.css("width",getSlideWidth2())};var loadElements=function(selector,callback){var total=selector.find('img:not([src=""]), iframe').length,count=0;if(total===0){callback();return}selector.find('img:not([src=""]), iframe').each(function(){$(this).one("load error",function(){if(++count===total){callback()}}).each(function(){if(this.complete||this.src===""){$(this).trigger("load")}})})};var start=function(){if(slider.settings.infiniteLoop&&slider.settings.mode!=="fade"){var slice=slider.settings.mode==="vertical"?slider.settings.minSlides:slider.settings.maxSlides,sliceAppend=slider.children.slice(0,slice).clone(true).addClass("wpmslider-clone"),slicePrepend=slider.children.slice(-slice).clone(true).addClass("wpmslider-clone");if(slider.settings.ariaHidden){sliceAppend.attr("aria-hidden",true);slicePrepend.attr("aria-hidden",true)}el.append(sliceAppend).prepend(slicePrepend)}slider.loader.remove();if(slider.settings.mode==="vertical"){slider.settings.adaptiveHeight=true}el.redrawSlider();slider.settings.onSliderLoad.call(el,slider.active.index);slider.initialized=true;slider.visibilityInterval=setInterval(visibilityCheck,500);if(slider.settings.responsive){attachListeners()}if(slider.settings.auto&&slider.settings.autoStart&&(getPagerQty()>1||slider.settings.autoSlideForOnePage)){initAuto()}if(slider.settings.pager){updatePagerActive(slider.settings.startSlide)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.touchEnabled){initTouch()}if(slider.settings.keyboardEnabled){$(document).keydown(keyPress)}};var attachListeners=function(){window.addEventListener("resize",updateLayout,false);window.addEventListener("orientationchange",updateLayout,false);window.addEventListener("blur",function(){pauseEvent("blur")});window.addEventListener("focus",function(){playEvent("blur")})};var updateLayout=_.debounce(function(){if(slider.debug)console.log(slider.logAs,"updateLayout");resizeWindow()},250);var visibilityCheck=function(){if(!slider.settings.auto){return}if(!reallyVisible()){pauseEvent("hide")}else{playEvent("hide")}if(!verge.inViewport(el)){pauseEvent("scroll")}else{playEvent("scroll")}};var pauseEvent=function(action){if(slider.interval){el.stopAuto(true);slider.autoPaused=action;if(slider.debug)console.log(slider.logAs,"pause",action)}};var playEvent=function(action){if(slider.autoPaused===action){el.startAuto(true);slider.autoPaused=null;if(slider.debug)console.log(slider.logAs,"play",action)}};var setSlideHeight=function(){var heights=slider.children.map(function(){return jQuery(this).actual("outerHeight")}).get();var maxHeight=arrayMax(heights);slider.children.height(maxHeight)};var unsetSlideHeight=function(){slider.children.height("auto")};var arrayMax=function(array){return Math.max.apply(Math,array)};var getViewportHeight=function(){var height=0;var children=$();if(slider.settings.mode!=="vertical"&&!slider.settings.adaptiveHeight){children=slider.children}else{if(!slider.carousel){children=slider.children.eq(slider.active.index)}else{var currentIndex=slider.settings.moveSlides===1?slider.active.index:slider.active.index*getMoveBy();children=slider.children.eq(currentIndex);for(var i=1;i<=slider.settings.maxSlides-1;i++){if(currentIndex+i>=slider.children.length){children=children.add(slider.children.eq(i-1))}else{children=children.add(slider.children.eq(currentIndex+i))}}}}if(slider.settings.mode==="vertical"){children.each(function(index){height+=$(this).outerHeight()});if(slider.settings.slideMargin>0){height+=slider.settings.slideMargin*(slider.settings.minSlides-1)}}else{height=Math.max.apply(Math,children.map(function(){return $(this).outerHeight(false)}).get())}if(slider.viewport.css("box-sizing")==="border-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))+parseFloat(slider.viewport.css("border-top-width"))+parseFloat(slider.viewport.css("border-bottom-width"))}else if(slider.viewport.css("box-sizing")==="padding-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))}return height};var setViewportHeight=function(){slider.viewport.height(getViewportHeight()+2)};var getViewportMaxWidth2=function(){return"100%"};var getSlideWidth2=function(){var wrapWidth=slider.viewport.width();var margins=slider.settings.slideMargin*(slider.settings.maxSlides-1);return Math.floor((wrapWidth-margins)/slider.settings.maxSlides)};var getNumberSlidesShowing2=function(){return slider.settings.maxSlides};var getPagerQty=function(){var pagerQty=0,breakPoint=0,counter=0;if(slider.settings.moveSlides>0){if(slider.settings.infiniteLoop){pagerQty=Math.ceil(slider.children.length/getMoveBy())}else{while(breakPoint<slider.children.length){++pagerQty;breakPoint=counter+getNumberSlidesShowing2();counter+=slider.settings.moveSlides<=getNumberSlidesShowing2()?slider.settings.moveSlides:getNumberSlidesShowing2()}return counter}}else{pagerQty=Math.ceil(slider.children.length/getNumberSlidesShowing2())}return pagerQty};var getMoveBy=function(){if(slider.settings.moveSlides>0&&slider.settings.moveSlides<=getNumberSlidesShowing2()){return slider.settings.moveSlides}return getNumberSlidesShowing2()};var setSlidePosition=function(){var position,lastChild,lastShowingIndex;if(slider.children.length>slider.settings.maxSlides&&slider.active.last&&!slider.settings.infiniteLoop){if(slider.settings.mode==="horizontal"){lastChild=slider.children.last();position=lastChild.position();setPositionProperty(-(position.left-(slider.viewport.width()-lastChild.outerWidth())),"reset",0)}else if(slider.settings.mode==="vertical"){lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position();setPositionProperty(-position.top,"reset",0)}}else{position=slider.children.eq(slider.active.index*getMoveBy()).position();if(slider.active.index===getPagerQty()-1){slider.active.last=true}if(position!==undefined){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}else if(slider.settings.mode==="none"){setPositionProperty(-position.top,"reset",0)}}}};var setPositionProperty=function(value,type,duration,params){var animateObj,propValue;if(slider.usingCSS){if(slider.settings.mode==="vertical"){propValue="translateY("+value+"px)"}else if(slider.settings.mode==="horizontal"){propValue="translateX("+value+"px"}else if(slider.settings.mode==="none"){propValue="translateY("+value+"px)";duration=0}el.css("-"+slider.cssPrefix+"-transition-duration",duration/1e3+"s");if(type==="slide"){el.css(slider.animProp,propValue);if(duration!==0){el.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){if(!$(e.target).is(el)){return}el.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");updateAfterSlideTransition()})}else{updateAfterSlideTransition()}}else if(type==="reset"){el.css(slider.animProp,propValue)}}else{animateObj={};animateObj[slider.animProp]=value;if(type==="slide"){el.animate(animateObj,duration,slider.settings.easing,function(){updateAfterSlideTransition()})}else if(type==="reset"){el.css(slider.animProp,value)}}};var populatePager=function(){var pagerHtml="",linkContent="",pagerQty=getPagerQty();for(var i=0;i<pagerQty;i++){linkContent="";if(slider.settings.buildPager){if(slider.settings.buildPager==="icons"){linkContent=""}if($.isFunction(slider.settings.buildPager)||slider.settings.pagerCustom){linkContent=slider.settings.buildPager(i)}slider.pagerEl.addClass("wpmslider-custom-pager")}else{linkContent=i+1;slider.pagerEl.addClass("wpmslider-default-pager")}pagerHtml+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+i+'" class="wpmslider-pager-link">'+linkContent+"</a></div>"}slider.pagerEl.html(pagerHtml)};var appendPager=function(){if(!slider.settings.pagerCustom){slider.pagerEl=$('<div class="wpmslider-pager" />');if(slider.settings.pagerSelector){$(slider.settings.pagerSelector).html(slider.pagerEl)}else{slider.controls.el.addClass("wpmslider-has-pager").append(slider.pagerEl)}populatePager()}else{slider.pagerEl=$(slider.settings.pagerCustom)}slider.pagerEl.on("click touchend","a",clickPagerBind)};var appendControlPrev=function(){slider.controls.prev=$('<a class="wpmslider-prev" href="">'+slider.settings.prevText+"</a>");slider.controls.prev.on("click touchend",clickPrevBind);if(slider.settings.prevSelector){$(slider.settings.prevSelector).append(slider.controls.prev)}if(!slider.settings.prevSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.prev);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlNext=function(){slider.controls.next=$('<a class="wpmslider-next" href="">'+slider.settings.nextText+"</a>");slider.controls.next.on("click touchend",clickNextBind);if(slider.settings.nextSelector){$(slider.settings.nextSelector).append(slider.controls.next)}if(!slider.settings.nextSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.next);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlsAuto=function(){slider.controls.start=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+slider.settings.startText+"</a></div>");slider.controls.stop=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+slider.settings.stopText+"</a></div>");slider.controls.autoEl=$('<div class="wpmslider-controls-auto" />');slider.controls.autoEl.on("click",".wpmslider-start",clickStartBind);slider.controls.autoEl.on("click",".wpmslider-stop",clickStopBind);if(slider.settings.autoControlsCombine){slider.controls.autoEl.append(slider.controls.start)}else{slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop)}if(slider.settings.autoControlsSelector){$(slider.settings.autoControlsSelector).html(slider.controls.autoEl)}else{slider.controls.el.addClass("wpmslider-has-controls-auto").append(slider.controls.autoEl)}updateAutoControls(slider.settings.autoStart?"stop":"start")};var appendCaptions=function(){slider.children.each(function(index){var title=$(this).find("img:first").attr("title");if(title!==undefined&&(""+title).length){$(this).append('<div class="wpmslider-caption"><span>'+title+"</span></div>")}})};var clickNextBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToNextSlide()};var clickPrevBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToPrevSlide()};var clickStartBind=function(e){el.startAuto();e.preventDefault();e.stopPropagation()};var clickStopBind=function(e){el.stopAuto();e.preventDefault();e.stopPropagation()};var clickPagerBind=function(e){var pagerLink,pagerIndex;e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}pagerLink=$(e.currentTarget);if(pagerLink.attr("data-slide-index")!==undefined){pagerIndex=parseInt(pagerLink.attr("data-slide-index"));if(pagerIndex!==slider.active.index){el.goToSlide(pagerIndex)}}};var updatePagerActive=function(slideIndex){var len=slider.children.length;if(slider.settings.pagerType==="short"){if(slider.settings.maxSlides>1){len=Math.ceil(slider.children.length/slider.settings.maxSlides)}slider.pagerEl.html(slideIndex+1+slider.settings.pagerShortSeparator+len);return}slider.pagerEl.find("a").removeClass("active");slider.pagerEl.each(function(i,el){$(el).find("a").eq(slideIndex).addClass("active")})};var updateAfterSlideTransition=function(){if(slider.settings.infiniteLoop){var position="";if(slider.active.index===0){position=slider.children.eq(0).position()}else if(slider.active.index===getPagerQty()-1&&slider.carousel){position=slider.children.eq((getPagerQty()-1)*getMoveBy()).position()}else if(slider.active.index===slider.children.length-1){position=slider.children.eq(slider.children.length-1).position()}if(position){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}}}slider.working=false;slider.settings.onSlideAfter.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)};var updateAutoControls=function(state){if(slider.settings.autoControlsCombine){slider.controls.autoEl.html(slider.controls[state])}else{slider.controls.autoEl.find("a").removeClass("active");slider.controls.autoEl.find("a:not(.wpmslider-"+state+")").addClass("active")}};var updateDirectionControls=function(){if(getPagerQty()===1){slider.controls.prev.addClass("disabled");slider.controls.next.addClass("disabled")}else if(!slider.settings.infiniteLoop&&slider.settings.hideControlOnEnd){if(slider.active.index===0){slider.controls.prev.addClass("disabled");slider.controls.next.removeClass("disabled")}else if(slider.active.index===getPagerQty()-1){slider.controls.next.addClass("disabled");slider.controls.prev.removeClass("disabled")}else{slider.controls.prev.removeClass("disabled");slider.controls.next.removeClass("disabled")}}};var initAuto=function(){if(slider.settings.autoDelay>0){setTimeout(el.startAuto,slider.settings.autoDelay)}else{el.startAuto()}if(slider.settings.autoHover){el.hover(function(){pauseEvent("hover")},function(){playEvent("hover")})}};var keyPress=function(e){var activeElementTag=document.activeElement.tagName.toLowerCase(),tagFilters="input|textarea",p=new RegExp(activeElementTag,["i"]),result=p.exec(tagFilters);if(result===null&&verge.inViewport(el)){if(e.keyCode===39){clickNextBind(e);return false}else if(e.keyCode===37){clickPrevBind(e);return false}}};var initTouch=function(){slider.touch={start:{x:0,y:0},end:{x:0,y:0}};slider.viewport.on("touchstart MSPointerDown pointerdown",onTouchStart);slider.viewport.on("click",".wpmslider a",function(e){if(slider.viewport.hasClass("click-disabled")){e.preventDefault();e.stopPropagation();slider.viewport.removeClass("click-disabled")}})};var onTouchStart=function(e){if(e.type!=="touchstart"&&e.button!==0){return}slider.controls.el.addClass("disabled");if(slider.working){e.preventDefault();e.stopPropagation();slider.controls.el.removeClass("disabled")}else{slider.touch.originalPos=el.position();var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig];var chromePointerEvents=typeof PointerEvent==="function";if(chromePointerEvents){if(orig.pointerId===undefined){return}}slider.touch.start.x=touchPoints[0].pageX;slider.touch.start.y=touchPoints[0].pageY;if(slider.viewport.get(0).setPointerCapture){slider.pointerId=orig.pointerId;slider.viewport.get(0).setPointerCapture(slider.pointerId)}slider.originalClickTarget=orig.originalTarget||orig.target;slider.originalClickButton=orig.button;slider.originalClickButtons=orig.buttons;slider.originalEventType=orig.type;slider.hasMove=false;slider.viewport.on("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.on("touchend MSPointerUp pointerup",onTouchEnd);slider.viewport.on("MSPointerCancel pointercancel",onPointerCancel)}};var onPointerCancel=function(e){e.preventDefault();setPositionProperty(slider.touch.originalPos.left,"reset",0);slider.controls.el.removeClass("disabled");slider.viewport.off("MSPointerCancel pointercancel",onPointerCancel);slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}};var onTouchMove=function(e){var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],xMovement=Math.abs(touchPoints[0].pageX-slider.touch.start.x),yMovement=Math.abs(touchPoints[0].pageY-slider.touch.start.y),value=0,change=0;slider.hasMove=true;if(xMovement*3>yMovement&&slider.settings.preventDefaultSwipeX){e.preventDefault();e.stopPropagation()}else if(yMovement*3>xMovement&&slider.settings.preventDefaultSwipeY){e.preventDefault();e.stopPropagation()}if(e.type!=="touchmove"){e.preventDefault()}if(slider.settings.mode!=="fade"&&slider.settings.oneToOneTouch){if(slider.settings.mode==="horizontal"){change=touchPoints[0].pageX-slider.touch.start.x;value=slider.touch.originalPos.left+change}else{change=touchPoints[0].pageY-slider.touch.start.y;value=slider.touch.originalPos.top+change}setPositionProperty(value,"reset",0)}};var onTouchEnd=function(e){e.preventDefault();slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.controls.el.removeClass("disabled");var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],value=0,distance=0;slider.touch.end.x=touchPoints[0].pageX;slider.touch.end.y=touchPoints[0].pageY;if(slider.settings.mode==="fade"){distance=Math.abs(slider.touch.start.x-slider.touch.end.x);if(distance>=slider.settings.swipeThreshold){if(slider.touch.start.x>slider.touch.end.x){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}}else{if(slider.settings.mode==="horizontal"){distance=slider.touch.end.x-slider.touch.start.x;value=slider.touch.originalPos.left}else{distance=slider.touch.end.y-slider.touch.start.y;value=slider.touch.originalPos.top}if(!slider.settings.infiniteLoop&&(slider.active.index===0&&distance>0||slider.active.last&&distance<0)){setPositionProperty(value,"reset",200)}else{if(Math.abs(distance)>=slider.settings.swipeThreshold){if(distance<0){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}else{setPositionProperty(value,"reset",200)}}}slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}if(slider.hasMove===false&&(slider.originalClickButton===0||slider.originalEventType==="touchstart")){$(slider.originalClickTarget).trigger({type:"click",button:slider.originalClickButton,buttons:slider.originalClickButtons})}};var resizeWindow=function(e){if(!slider.initialized){if(slider.debug)console.log(slider.logAs,"slider not initialized");return}if(slider.working){if(slider.debug)console.log(slider.logAs,"slider working");window.setTimeout(resizeWindow,10)}else{el.redrawSlider();slider.settings.onSliderResize.call(el,slider.active.index)}};var applyAriaHiddenAttributes=function(startVisibleIndex){var numberOfSlidesShowing=getNumberSlidesShowing2();if(slider.settings.ariaHidden){slider.children.attr("aria-hidden","true");slider.children.slice(startVisibleIndex,startVisibleIndex+numberOfSlidesShowing).attr("aria-hidden","false")}};var setSlideIndex=function(slideIndex){if(slideIndex<0){if(slider.settings.infiniteLoop){return getPagerQty()-1}else{return slider.active.index}}else if(slideIndex>=getPagerQty()){if(slider.settings.infiniteLoop){return 0}else{return slider.active.index}}else{return slideIndex}};el.goToSlide=function(slideIndex,direction){var performTransition=true,moveBy=0,position={left:0,top:0},lastChild=null,lastShowingIndex,eq,value,requestEl;slider.oldIndex=slider.active.index;slider.active.index=setSlideIndex(slideIndex);if(slider.working||slider.active.index===slider.oldIndex){return}slider.working=true;performTransition=slider.settings.onSlideBefore.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index);if(typeof performTransition!=="undefined"&&!performTransition){slider.active.index=slider.oldIndex;slider.working=false;return}if(direction==="next"){if(!slider.settings.onSlideNext.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}else if(direction==="prev"){if(!slider.settings.onSlidePrev.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}slider.active.last=slider.active.index>=getPagerQty()-1;if(slider.settings.pager||slider.settings.pagerCustom){updatePagerActive(slider.active.index)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.mode==="fade"){if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}slider.children.filter(":visible").fadeOut(slider.settings.speed).css({zIndex:0});slider.children.eq(slider.active.index).css("zIndex",slider.settings.slideZIndex+1).fadeIn(slider.settings.speed,function(){$(this).css("zIndex",slider.settings.slideZIndex);updateAfterSlideTransition()})}else{if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}if(!slider.settings.infiniteLoop&&slider.carousel&&slider.active.last){if(slider.settings.mode==="horizontal"){lastChild=slider.children.eq(slider.children.length-1);position=lastChild.position();moveBy=slider.viewport.width()-lastChild.outerWidth()}else{lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position()}}else if(slider.carousel&&slider.active.last&&direction==="prev"){eq=slider.settings.moveSlides===1?slider.settings.maxSlides-getMoveBy():(getPagerQty()-1)*getMoveBy()-(slider.children.length-slider.settings.maxSlides);lastChild=el.children(".wpmslider-clone").eq(eq);position=lastChild.position()}else if(direction==="next"&&slider.active.index===0){position=el.find("> .wpmslider-clone").eq(slider.settings.maxSlides).position();slider.active.last=false}else if(slideIndex>=0){requestEl=slideIndex*parseInt(getMoveBy());position=slider.children.eq(requestEl).position()}if(typeof position!=="undefined"){value=slider.settings.mode==="horizontal"?-(position.left-moveBy):-position.top;setPositionProperty(value,"slide",slider.settings.speed)}slider.working=false}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.goToNextSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.last){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)+1;el.goToSlide(pagerIndex,"next")};el.goToPrevSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.index===0){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)-1;el.goToSlide(pagerIndex,"prev")};el.startAuto=function(preventControlUpdate){if(slider.interval){return}slider.interval=setInterval(function(){if(slider.settings.autoDirection==="next"){el.goToNextSlide()}else{el.goToPrevSlide()}},slider.settings.pause);slider.settings.onAutoChange.call(el,true);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("stop")}};el.stopAuto=function(preventControlUpdate){if(slider.autoPaused)slider.autoPaused=false;if(!slider.interval){return}clearInterval(slider.interval);slider.interval=null;slider.settings.onAutoChange.call(el,false);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("start")}};el.getCurrentSlide=function(){return slider.active.index};el.getCurrentSlideElement=function(){return slider.children.eq(slider.active.index)};el.getSlideElement=function(index){return slider.children.eq(index)};el.getSlideCount=function(){return slider.children.length};el.isWorking=function(){return slider.working};el.redrawSlider=function(){if(slider.debug)console.log(slider.logAs,"redrawSlider");updateWidth();unsetSlideHeight();setViewportHeight();if(slider.settings.stretch){setSlideHeight()}slider.children.add(el.find(".wpmslider-clone")).outerWidth(getSlideWidth2());setSlidePosition();if(slider.active.last){slider.active.index=getPagerQty()-1}if(slider.active.index>=getPagerQty()){slider.active.last=true}if(slider.settings.pager&&!slider.settings.pagerCustom){populatePager();updatePagerActive(slider.active.index)}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.destroySlider=function(){if(!slider.initialized){return}slider.initialized=false;$(".wpmslider-clone",this).remove();slider.children.each(function(){if($(this).data("origStyle")!==undefined){$(this).attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}});if($(this).data("origStyle")!==undefined){this.attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}$(this).unwrap().unwrap();if(slider.controls.el){slider.controls.el.remove()}if(slider.controls.next){slider.controls.next.remove()}if(slider.controls.prev){slider.controls.prev.remove()}if(slider.pagerEl&&slider.settings.controls&&!slider.settings.pagerCustom){slider.pagerEl.remove()}$(".wpmslider-caption",this).remove();if(slider.controls.autoEl){slider.controls.autoEl.remove()}clearInterval(slider.interval);clearInterval(slider.visibilityInterval);if(slider.settings.responsive){$(window).off("resize",resizeWindow)}if(slider.settings.keyboardEnabled){$(document).off("keydown",keyPress)}$(this).removeData("strongSlider")};el.reloadSlider=function(settings){if(settings!==undefined){options=settings}el.destroySlider();init();$(el).data("strongSlider",this)};init();$(el).data("strongSlider",this);viewEl.attr("data-state","init");if(slider.debug)console.log(slider.logAs,"viewport",verge.viewportW(),"x",verge.viewportH());return this}})(jQuery);
1
+ (function($){var defaults={debug:false,logAs:"strongSlider",compat:{lazyload:{active:false,classes:{}}},mode:"horizontal",slideSelector:"div.t-slide",infiniteLoop:true,hideControlOnEnd:false,speed:500,easing:null,slideMargin:10,startSlide:0,randomStart:false,captions:false,adaptiveHeight:false,adaptiveHeightSpeed:500,video:false,useCSS:true,preloadImages:"visible",responsive:true,slideZIndex:50,wrapperClass:"wpmslider-wrapper",stretch:false,imagesLoaded:true,touchEnabled:true,swipeThreshold:50,oneToOneTouch:true,preventDefaultSwipeX:true,preventDefaultSwipeY:false,ariaLive:true,ariaHidden:true,keyboardEnabled:false,pager:true,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:true,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:false,startText:"Start",stopText:"Stop",autoControlsCombine:false,autoControlsSelector:null,auto:true,pause:4e3,autoStart:true,autoDirection:"next",stopAutoOnClick:false,autoHover:false,autoDelay:0,autoSlideForOnePage:false,minSlides:1,maxSlides:1,moveSlides:0,onSliderLoad:function(){return true},onSlideBefore:function(){return true},onSlideAfter:function(){return true},onSlideNext:function(){return true},onSlidePrev:function(){return true},onSliderResize:function(){return true},onAutoChange:function(){return true}};$.fn.strongSlider=function(options){if(this.length===0){return this}var slider={},viewEl=this,el=this.find(".wpmslider-content");if($(el).data("strongSlider")){return}var init=function(){if($(el).data("strongSlider")){return}slider.visibilityInterval=0;slider.hidden=false;var sliderVar=viewEl.data("slider-var");var config={};if(typeof window[sliderVar]!=="undefined"){config=window[sliderVar].config}slider.settings=$.extend({},defaults,config,options);slider.debug=slider.settings.debug;slider.logAs=slider.settings.logAs;if(slider.debug)console.log(slider.logAs,"slider.settings",slider.settings);slider.children=el.children(slider.settings.slideSelector);if(slider.children.length<slider.settings.minSlides){slider.settings.minSlides=slider.children.length}if(slider.children.length<slider.settings.maxSlides){slider.settings.maxSlides=slider.children.length}if(slider.settings.randomStart){slider.settings.startSlide=Math.floor(Math.random()*slider.children.length)}slider.active={index:slider.settings.startSlide};setBreakpoint();if(slider.carousel){slider.settings.preloadImages="all"}slider.working=false;slider.controls={};slider.interval=null;slider.animProp=slider.settings.mode==="vertical"?"top":"left";slider.usingCSS=slider.settings.useCSS&&slider.settings.mode!=="fade"&&function(){var div=document.createElement("div"),props=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i=0;i<props.length;i++){if(div.style[props[i]]!==undefined){slider.cssPrefix=props[i].replace("Perspective","").toLowerCase();slider.animProp="-"+slider.cssPrefix+"-transform";return true}}return false}();if(slider.settings.mode==="vertical"){slider.settings.maxSlides=slider.settings.minSlides}el.data("origStyle",el.attr("style"));el.children(slider.settings.slideSelector).each(function(){$(this).data("origStyle",$(this).attr("style"))});if(!el.getSlideCount()){return}if(slider.settings.imagesLoaded){viewEl.imagesLoaded(function(){initVisibilityCheck()})}else{initVisibilityCheck()}};var reallyVisible=function(){return viewEl.is(":visible")&&viewEl.css("visibility")!=="hidden"};var compatCheck=function(){if(slider.settings.compat.lazyload){var inProgress=false;for(var i=0,len=slider.settings.compat.lazyload.classes.length;i<len;i++){var startClass=slider.settings.compat.lazyload.classes[i].start;var finishClass=slider.settings.compat.lazyload.classes[i].finish;if(startClass&&finishClass){if(viewEl.find("img."+startClass).length&&!viewEl.find("img."+finishClass).length){inProgress=true}}else if(startClass){if(viewEl.find("img."+startClass).length){inProgress=true}}else if(finishClass){if(!viewEl.find("img."+finishClass).length){inProgress=true}}}if(inProgress){if(slider.debug)console.log(slider.logAs,"lazy loading...");return false}}if(slider.debug)console.log(slider.logAs,"compat check complete");return true};var initVisibilityCheck=function(){if(reallyVisible()&&compatCheck()){clearInterval(slider.visibilityInterval);setup()}else{if(slider.visibilityInterval===0){slider.visibilityInterval=setInterval(initVisibilityCheck,1e3*4)}}};var setup=function(){var preloadSelector=slider.children.eq(slider.settings.startSlide);el.wrap('<div class="'+slider.settings.wrapperClass+'"><div class="wpmslider-viewport"></div></div>');slider.viewport=el.parent();if(slider.settings.ariaLive){slider.viewport.attr("aria-live","polite")}slider.loader=$('<div class="wpmslider-loading" />');slider.viewport.prepend(slider.loader);el.css({width:slider.settings.mode==="horizontal"?slider.children.length*1e3+215+"%":"auto",position:"relative"});if(slider.usingCSS&&slider.settings.easing){el.css("-"+slider.cssPrefix+"-transition-timing-function",slider.settings.easing)}else if(!slider.settings.easing){slider.settings.easing="swing"}slider.viewport.css({width:"100%",overflow:"hidden",position:"relative"});slider.viewport.parent().css({maxWidth:getViewportMaxWidth2()});if(!slider.settings.pager&&!slider.settings.controls){slider.viewport.parent().css({margin:"0 auto"})}slider.children.css({float:slider.settings.mode==="horizontal"?"left":"none",listStyle:"none",position:"relative"});updateWidth();if(slider.settings.mode==="horizontal"&&slider.settings.slideMargin>0){slider.children.css("marginRight",slider.settings.slideMargin)}if(slider.settings.mode==="vertical"&&slider.settings.slideMargin>0){slider.children.css("marginBottom",slider.settings.slideMargin)}if(slider.settings.mode==="fade"){slider.children.css({position:"absolute",zIndex:0,display:"none"});slider.children.eq(slider.settings.startSlide).css({zIndex:slider.settings.slideZIndex,display:"block"})}else{slider.children.css({display:"block"})}slider.controls.el=$('<div class="wpmslider-controls" />');if(slider.settings.captions){appendCaptions()}slider.active.last=slider.settings.startSlide===getPagerQty()-1;if(slider.settings.video){el.fitVids()}if(slider.settings.preloadImages==="none"){preloadSelector=null}else if(slider.settings.preloadImages==="all"){preloadSelector=slider.children}if(slider.settings.controls){appendControlPrev()}if(slider.settings.auto&&slider.settings.autoControls){appendControlsAuto()}if(slider.settings.pager){appendPager()}if(slider.settings.controls){appendControlNext()}if(slider.settings.controls||slider.settings.autoControls||slider.settings.pager){slider.viewport.after(slider.controls.el)}if(preloadSelector===null){start()}else{loadElements(preloadSelector,start)}};var setBreakpoint=function(){if(slider.debug)console.log(slider.logAs,"setBreakpoint");var currentBreakpoint=slider.settings.breakpoints.single;var breakpoints=slider.settings.breakpoints.multiple;if(slider.settings.type==="show_multiple"){for(var key in breakpoints){if(breakpoints.hasOwnProperty(key)){if(verge.viewportW()>=breakpoints[key].width){currentBreakpoint=breakpoints[key];break}}}}if(slider.debug)console.log("current breakpoint",currentBreakpoint);slider.settings.maxSlides=currentBreakpoint.maxSlides;slider.settings.moveSlides=currentBreakpoint.moveSlides;slider.settings.slideMargin=currentBreakpoint.slideMargin;slider.carousel=slider.settings.minSlides>1||slider.settings.maxSlides>1};var updateWidth=function(){setBreakpoint();slider.children.css("width",getSlideWidth2())};var loadElements=function(selector,callback){var total=selector.find('img:not([src=""]), iframe').length,count=0;if(total===0){callback();return}selector.find('img:not([src=""]), iframe').each(function(){$(this).one("load error",function(){if(++count===total){callback()}}).each(function(){if(this.complete||this.src===""){$(this).trigger("load")}})})};var start=function(){if(slider.settings.infiniteLoop&&slider.settings.mode!=="fade"){var slice=slider.settings.mode==="vertical"?slider.settings.minSlides:slider.settings.maxSlides,sliceAppend=slider.children.slice(0,slice).clone(true).addClass("wpmslider-clone"),slicePrepend=slider.children.slice(-slice).clone(true).addClass("wpmslider-clone");if(slider.settings.ariaHidden){sliceAppend.attr("aria-hidden",true);slicePrepend.attr("aria-hidden",true)}el.append(sliceAppend).prepend(slicePrepend)}slider.loader.remove();if(slider.settings.mode==="vertical"){slider.settings.adaptiveHeight=true}el.redrawSlider();slider.settings.onSliderLoad.call(el,slider.active.index);slider.initialized=true;slider.visibilityInterval=setInterval(visibilityCheck,500);if(slider.settings.responsive){attachListeners()}if(slider.settings.auto&&slider.settings.autoStart&&(getPagerQty()>1||slider.settings.autoSlideForOnePage)){initAuto()}if(slider.settings.pager){updatePagerActive(slider.settings.startSlide)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.touchEnabled){initTouch()}if(slider.settings.keyboardEnabled){$(document).keydown(keyPress)}};var attachListeners=function(){window.addEventListener("resize",updateLayout,false);window.addEventListener("orientationchange",updateLayout,false);window.addEventListener("blur",function(){pauseEvent("blur")});window.addEventListener("focus",function(){playEvent("blur")})};var updateLayout=_.debounce(function(){if(slider.debug)console.log(slider.logAs,"updateLayout");resizeWindow()},250);var visibilityCheck=function(){if(!slider.settings.auto){return}if(!reallyVisible()){pauseEvent("hide")}else{playEvent("hide")}if(!verge.inViewport(el)){pauseEvent("scroll")}else{playEvent("scroll")}};var pauseEvent=function(action){if(slider.interval){el.stopAuto(true);slider.autoPaused=action;if(slider.debug)console.log(slider.logAs,"pause",action)}};var playEvent=function(action){if(slider.autoPaused===action){el.startAuto(true);slider.autoPaused=null;if(slider.debug)console.log(slider.logAs,"play",action)}};var setSlideHeight=function(){var heights=slider.children.map(function(){return jQuery(this).actual("outerHeight")}).get();var maxHeight=arrayMax(heights);slider.children.height(maxHeight)};var unsetSlideHeight=function(){slider.children.height("auto")};var arrayMax=function(array){return Math.max.apply(Math,array)};var getViewportHeight=function(){var height=0;var children=$();if(slider.settings.mode!=="vertical"&&!slider.settings.adaptiveHeight){children=slider.children}else{if(!slider.carousel){children=slider.children.eq(slider.active.index)}else{var currentIndex=slider.settings.moveSlides===1?slider.active.index:slider.active.index*getMoveBy();children=slider.children.eq(currentIndex);for(var i=1;i<=slider.settings.maxSlides-1;i++){if(currentIndex+i>=slider.children.length){children=children.add(slider.children.eq(i-1))}else{children=children.add(slider.children.eq(currentIndex+i))}}}}if(slider.settings.mode==="vertical"){children.each(function(index){height+=$(this).outerHeight()});if(slider.settings.slideMargin>0){height+=slider.settings.slideMargin*(slider.settings.minSlides-1)}}else{height=Math.max.apply(Math,children.map(function(){return $(this).outerHeight(false)}).get())}if(slider.viewport.css("box-sizing")==="border-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))+parseFloat(slider.viewport.css("border-top-width"))+parseFloat(slider.viewport.css("border-bottom-width"))}else if(slider.viewport.css("box-sizing")==="padding-box"){height+=parseFloat(slider.viewport.css("padding-top"))+parseFloat(slider.viewport.css("padding-bottom"))}return height};var setViewportHeight=function(){slider.viewport.height(getViewportHeight()+2)};var getViewportMaxWidth2=function(){return"100%"};var getSlideWidth2=function(){var wrapWidth=slider.viewport.width();var margins=slider.settings.slideMargin*(slider.settings.maxSlides-1);return Math.floor((wrapWidth-margins)/slider.settings.maxSlides)};var getNumberSlidesShowing2=function(){return slider.settings.maxSlides};var getPagerQty=function(){var pagerQty=0,breakPoint=0,counter=0;if(slider.settings.moveSlides>0){if(slider.settings.infiniteLoop){pagerQty=Math.ceil(slider.children.length/getMoveBy())}else{while(breakPoint<slider.children.length){++pagerQty;breakPoint=counter+getNumberSlidesShowing2();counter+=slider.settings.moveSlides<=getNumberSlidesShowing2()?slider.settings.moveSlides:getNumberSlidesShowing2()}return counter}}else{pagerQty=Math.ceil(slider.children.length/getNumberSlidesShowing2())}return pagerQty};var getMoveBy=function(){if(slider.settings.moveSlides>0&&slider.settings.moveSlides<=getNumberSlidesShowing2()){return slider.settings.moveSlides}return getNumberSlidesShowing2()};var setSlidePosition=function(){var position,lastChild,lastShowingIndex;if(slider.children.length>slider.settings.maxSlides&&slider.active.last&&!slider.settings.infiniteLoop){if(slider.settings.mode==="horizontal"){lastChild=slider.children.last();position=lastChild.position();setPositionProperty(-(position.left-(slider.viewport.width()-lastChild.outerWidth())),"reset",0)}else if(slider.settings.mode==="vertical"){lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position();setPositionProperty(-position.top,"reset",0)}}else{position=slider.children.eq(slider.active.index*getMoveBy()).position();if(slider.active.index===getPagerQty()-1){slider.active.last=true}if(position!==undefined){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}else if(slider.settings.mode==="none"){setPositionProperty(-position.top,"reset",0)}}}};var setPositionProperty=function(value,type,duration,params){var animateObj,propValue;if(slider.usingCSS){if(slider.settings.mode==="vertical"){propValue="translateY("+value+"px)"}else if(slider.settings.mode==="horizontal"){propValue="translateX("+value+"px"}else if(slider.settings.mode==="none"){propValue="translateY("+value+"px)";duration=0}el.css("-"+slider.cssPrefix+"-transition-duration",duration/1e3+"s");if(type==="slide"){el.css(slider.animProp,propValue);if(duration!==0){el.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){if(!$(e.target).is(el)){return}el.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd");updateAfterSlideTransition()})}else{updateAfterSlideTransition()}}else if(type==="reset"){el.css(slider.animProp,propValue)}}else{animateObj={};animateObj[slider.animProp]=value;if(type==="slide"){el.animate(animateObj,duration,slider.settings.easing,function(){updateAfterSlideTransition()})}else if(type==="reset"){el.css(slider.animProp,value)}}};var populatePager=function(){var pagerHtml="",linkContent="",pagerQty=getPagerQty();for(var i=0;i<pagerQty;i++){linkContent="";if(slider.settings.buildPager){if(slider.settings.buildPager==="icons"){linkContent=""}if($.isFunction(slider.settings.buildPager)||slider.settings.pagerCustom){linkContent=slider.settings.buildPager(i)}slider.pagerEl.addClass("wpmslider-custom-pager")}else{linkContent=i+1;slider.pagerEl.addClass("wpmslider-default-pager")}pagerHtml+='<div class="wpmslider-pager-item"><a href="" data-slide-index="'+i+'" class="wpmslider-pager-link">'+linkContent+"</a></div>"}slider.pagerEl.html(pagerHtml)};var appendPager=function(){if(!slider.settings.pagerCustom){slider.pagerEl=$('<div class="wpmslider-pager" />');if(slider.settings.pagerSelector){$(slider.settings.pagerSelector).html(slider.pagerEl)}else{slider.controls.el.addClass("wpmslider-has-pager").append(slider.pagerEl)}populatePager()}else{slider.pagerEl=$(slider.settings.pagerCustom)}slider.pagerEl.on("click touchend","a",clickPagerBind)};var appendControlPrev=function(){slider.controls.prev=$('<a class="wpmslider-prev" href="">'+slider.settings.prevText+"</a>");slider.controls.prev.on("click touchend",clickPrevBind);if(slider.settings.prevSelector){$(slider.settings.prevSelector).append(slider.controls.prev)}if(!slider.settings.prevSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.prev);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlNext=function(){slider.controls.next=$('<a class="wpmslider-next" href="">'+slider.settings.nextText+"</a>");slider.controls.next.on("click touchend",clickNextBind);if(slider.settings.nextSelector){$(slider.settings.nextSelector).append(slider.controls.next)}if(!slider.settings.nextSelector){slider.controls.directionEl=$('<div class="wpmslider-controls-direction" />');slider.controls.directionEl.append(slider.controls.next);slider.controls.el.addClass("wpmslider-has-controls-direction").append(slider.controls.directionEl)}};var appendControlsAuto=function(){slider.controls.start=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-start" href="">'+slider.settings.startText+"</a></div>");slider.controls.stop=$('<div class="wpmslider-controls-auto-item"><a class="wpmslider-stop" href="">'+slider.settings.stopText+"</a></div>");slider.controls.autoEl=$('<div class="wpmslider-controls-auto" />');slider.controls.autoEl.on("click",".wpmslider-start",clickStartBind);slider.controls.autoEl.on("click",".wpmslider-stop",clickStopBind);if(slider.settings.autoControlsCombine){slider.controls.autoEl.append(slider.controls.start)}else{slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop)}if(slider.settings.autoControlsSelector){$(slider.settings.autoControlsSelector).html(slider.controls.autoEl)}else{slider.controls.el.addClass("wpmslider-has-controls-auto").append(slider.controls.autoEl)}updateAutoControls(slider.settings.autoStart?"stop":"start")};var appendCaptions=function(){slider.children.each(function(index){var title=$(this).find("img:first").attr("title");if(title!==undefined&&(""+title).length){$(this).append('<div class="wpmslider-caption"><span>'+title+"</span></div>")}})};var clickNextBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToNextSlide()};var clickPrevBind=function(e){e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}el.goToPrevSlide()};var clickStartBind=function(e){el.startAuto();e.preventDefault();e.stopPropagation()};var clickStopBind=function(e){el.stopAuto();e.preventDefault();e.stopPropagation()};var clickPagerBind=function(e){var pagerLink,pagerIndex;e.preventDefault();e.stopPropagation();if(slider.controls.el.hasClass("disabled")){return}if(slider.settings.auto&&slider.settings.stopAutoOnClick){if(slider.debug)console.log(slider.logAs,"stop on navigation");el.stopAuto()}pagerLink=$(e.currentTarget);if(pagerLink.attr("data-slide-index")!==undefined){pagerIndex=parseInt(pagerLink.attr("data-slide-index"));if(pagerIndex!==slider.active.index){el.goToSlide(pagerIndex)}}};var updatePagerActive=function(slideIndex){var len=slider.children.length;if(slider.settings.pagerType==="short"){if(slider.settings.maxSlides>1){len=Math.ceil(slider.children.length/slider.settings.maxSlides)}slider.pagerEl.html(slideIndex+1+slider.settings.pagerShortSeparator+len);return}slider.pagerEl.find("a").removeClass("active");slider.pagerEl.each(function(i,el){$(el).find("a").eq(slideIndex).addClass("active")})};var updateAfterSlideTransition=function(){if(slider.settings.infiniteLoop){var position="";if(slider.active.index===0){position=slider.children.eq(0).position()}else if(slider.active.index===getPagerQty()-1&&slider.carousel){position=slider.children.eq((getPagerQty()-1)*getMoveBy()).position()}else if(slider.active.index===slider.children.length-1){position=slider.children.eq(slider.children.length-1).position()}if(position){if(slider.settings.mode==="horizontal"){setPositionProperty(-position.left,"reset",0)}else if(slider.settings.mode==="vertical"){setPositionProperty(-position.top,"reset",0)}}}slider.working=false;slider.settings.onSlideAfter.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)};var updateAutoControls=function(state){if(slider.settings.autoControlsCombine){slider.controls.autoEl.html(slider.controls[state])}else{slider.controls.autoEl.find("a").removeClass("active");slider.controls.autoEl.find("a:not(.wpmslider-"+state+")").addClass("active")}};var updateDirectionControls=function(){if(getPagerQty()===1){slider.controls.prev.addClass("disabled");slider.controls.next.addClass("disabled")}else if(!slider.settings.infiniteLoop&&slider.settings.hideControlOnEnd){if(slider.active.index===0){slider.controls.prev.addClass("disabled");slider.controls.next.removeClass("disabled")}else if(slider.active.index===getPagerQty()-1){slider.controls.next.addClass("disabled");slider.controls.prev.removeClass("disabled")}else{slider.controls.prev.removeClass("disabled");slider.controls.next.removeClass("disabled")}}};var initAuto=function(){if(slider.settings.autoDelay>0){setTimeout(el.startAuto,slider.settings.autoDelay)}else{el.startAuto()}if(slider.settings.autoHover){el.hover(function(){pauseEvent("hover")},function(){playEvent("hover")})}};var keyPress=function(e){var activeElementTag=document.activeElement.tagName.toLowerCase(),tagFilters="input|textarea",p=new RegExp(activeElementTag,["i"]),result=p.exec(tagFilters);if(result===null&&verge.inViewport(el)){if(e.keyCode===39){clickNextBind(e);return false}else if(e.keyCode===37){clickPrevBind(e);return false}}};var initTouch=function(){slider.touch={start:{x:0,y:0},end:{x:0,y:0}};slider.viewport.on("touchstart MSPointerDown pointerdown",onTouchStart);slider.viewport.on("click",".wpmslider a",function(e){if(slider.viewport.hasClass("click-disabled")){e.preventDefault();e.stopPropagation();slider.viewport.removeClass("click-disabled")}})};var onTouchStart=function(e){if(e.type!=="touchstart"&&e.button!==0){return}slider.controls.el.addClass("disabled");if(slider.working){e.preventDefault();e.stopPropagation();slider.controls.el.removeClass("disabled")}else{slider.touch.originalPos=el.position();var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig];var chromePointerEvents=typeof PointerEvent==="function";if(chromePointerEvents){if(orig.pointerId===undefined){return}}slider.touch.start.x=touchPoints[0].pageX;slider.touch.start.y=touchPoints[0].pageY;if(slider.viewport.get(0).setPointerCapture){slider.pointerId=orig.pointerId;slider.viewport.get(0).setPointerCapture(slider.pointerId)}slider.originalClickTarget=orig.originalTarget||orig.target;slider.originalClickButton=orig.button;slider.originalClickButtons=orig.buttons;slider.originalEventType=orig.type;slider.hasMove=false;slider.viewport.on("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.on("touchend MSPointerUp pointerup",onTouchEnd);slider.viewport.on("MSPointerCancel pointercancel",onPointerCancel)}};var onPointerCancel=function(e){e.preventDefault();setPositionProperty(slider.touch.originalPos.left,"reset",0);slider.controls.el.removeClass("disabled");slider.viewport.off("MSPointerCancel pointercancel",onPointerCancel);slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}};var onTouchMove=function(e){var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],xMovement=Math.abs(touchPoints[0].pageX-slider.touch.start.x),yMovement=Math.abs(touchPoints[0].pageY-slider.touch.start.y),value=0,change=0;slider.hasMove=true;if(xMovement*3>yMovement&&slider.settings.preventDefaultSwipeX){e.preventDefault();e.stopPropagation()}else if(yMovement*3>xMovement&&slider.settings.preventDefaultSwipeY){e.preventDefault();e.stopPropagation()}if(e.type!=="touchmove"){e.preventDefault()}if(slider.settings.mode!=="fade"&&slider.settings.oneToOneTouch){if(slider.settings.mode==="horizontal"){change=touchPoints[0].pageX-slider.touch.start.x;value=slider.touch.originalPos.left+change}else{change=touchPoints[0].pageY-slider.touch.start.y;value=slider.touch.originalPos.top+change}setPositionProperty(value,"reset",0)}};var onTouchEnd=function(e){e.preventDefault();slider.viewport.off("touchmove MSPointerMove pointermove",onTouchMove);slider.controls.el.removeClass("disabled");var orig=e.originalEvent,touchPoints=typeof orig.changedTouches!=="undefined"?orig.changedTouches:[orig],value=0,distance=0;slider.touch.end.x=touchPoints[0].pageX;slider.touch.end.y=touchPoints[0].pageY;if(slider.settings.mode==="fade"){distance=Math.abs(slider.touch.start.x-slider.touch.end.x);if(distance>=slider.settings.swipeThreshold){if(slider.touch.start.x>slider.touch.end.x){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}}else{if(slider.settings.mode==="horizontal"){distance=slider.touch.end.x-slider.touch.start.x;value=slider.touch.originalPos.left}else{distance=slider.touch.end.y-slider.touch.start.y;value=slider.touch.originalPos.top}if(!slider.settings.infiniteLoop&&(slider.active.index===0&&distance>0||slider.active.last&&distance<0)){setPositionProperty(value,"reset",200)}else{if(Math.abs(distance)>=slider.settings.swipeThreshold){if(distance<0){el.goToNextSlide()}else{el.goToPrevSlide()}el.stopAuto()}else{setPositionProperty(value,"reset",200)}}}slider.viewport.off("touchend MSPointerUp pointerup",onTouchEnd);if(slider.viewport.get(0).releasePointerCapture){slider.viewport.get(0).releasePointerCapture(slider.pointerId)}if(slider.hasMove===false&&(slider.originalClickButton===0||slider.originalEventType==="touchstart")){$(slider.originalClickTarget).trigger({type:"click",button:slider.originalClickButton,buttons:slider.originalClickButtons})}};var resizeWindow=function(e){if(!slider.initialized){if(slider.debug)console.log(slider.logAs,"slider not initialized");return}if(slider.working){if(slider.debug)console.log(slider.logAs,"slider working");window.setTimeout(resizeWindow,10)}else{el.redrawSlider();slider.settings.onSliderResize.call(el,slider.active.index)}};var applyAriaHiddenAttributes=function(startVisibleIndex){var numberOfSlidesShowing=getNumberSlidesShowing2();if(slider.settings.ariaHidden){slider.children.attr("aria-hidden","true");slider.children.slice(startVisibleIndex,startVisibleIndex+numberOfSlidesShowing).attr("aria-hidden","false")}};var setSlideIndex=function(slideIndex){if(slideIndex<0){if(slider.settings.infiniteLoop){return getPagerQty()-1}else{return slider.active.index}}else if(slideIndex>=getPagerQty()){if(slider.settings.infiniteLoop){return 0}else{return slider.active.index}}else{return slideIndex}};el.goToSlide=function(slideIndex,direction){var performTransition=true,moveBy=0,position={left:0,top:0},lastChild=null,lastShowingIndex,eq,value,requestEl;slider.oldIndex=slider.active.index;slider.active.index=setSlideIndex(slideIndex);if(slider.working||slider.active.index===slider.oldIndex){return}slider.working=true;performTransition=slider.settings.onSlideBefore.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index);if(typeof performTransition!=="undefined"&&!performTransition){slider.active.index=slider.oldIndex;slider.working=false;return}if(direction==="next"){if(!slider.settings.onSlideNext.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}else if(direction==="prev"){if(!slider.settings.onSlidePrev.call(el,slider.children.eq(slider.active.index),slider.oldIndex,slider.active.index)){performTransition=false}}slider.active.last=slider.active.index>=getPagerQty()-1;if(slider.settings.pager||slider.settings.pagerCustom){updatePagerActive(slider.active.index)}if(slider.settings.controls){updateDirectionControls()}if(slider.settings.mode==="fade"){if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}slider.children.filter(":visible").fadeOut(slider.settings.speed).css({zIndex:0});slider.children.eq(slider.active.index).css("zIndex",slider.settings.slideZIndex+1).fadeIn(slider.settings.speed,function(){$(this).css("zIndex",slider.settings.slideZIndex);updateAfterSlideTransition()})}else{if(slider.settings.adaptiveHeight&&slider.viewport.height()!==getViewportHeight()){slider.viewport.animate({height:getViewportHeight()},slider.settings.adaptiveHeightSpeed)}if(!slider.settings.infiniteLoop&&slider.carousel&&slider.active.last){if(slider.settings.mode==="horizontal"){lastChild=slider.children.eq(slider.children.length-1);position=lastChild.position();moveBy=slider.viewport.width()-lastChild.outerWidth()}else{lastShowingIndex=slider.children.length-slider.settings.minSlides;position=slider.children.eq(lastShowingIndex).position()}}else if(slider.carousel&&slider.active.last&&direction==="prev"){eq=slider.settings.moveSlides===1?slider.settings.maxSlides-getMoveBy():(getPagerQty()-1)*getMoveBy()-(slider.children.length-slider.settings.maxSlides);lastChild=el.children(".wpmslider-clone").eq(eq);position=lastChild.position()}else if(direction==="next"&&slider.active.index===0){position=el.find("> .wpmslider-clone").eq(slider.settings.maxSlides).position();slider.active.last=false}else if(slideIndex>=0){requestEl=slideIndex*parseInt(getMoveBy());position=slider.children.eq(requestEl).position()}if(typeof position!=="undefined"){value=slider.settings.mode==="horizontal"?-(position.left-moveBy):-position.top;setPositionProperty(value,"slide",slider.settings.speed)}slider.working=false}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.goToNextSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.last){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)+1;el.goToSlide(pagerIndex,"next")};el.goToPrevSlide=function(){if(!slider.settings.infiniteLoop&&slider.active.index===0){return}if(slider.working===true){return}var pagerIndex=parseInt(slider.active.index)-1;el.goToSlide(pagerIndex,"prev")};el.startAuto=function(preventControlUpdate){if(slider.interval){return}slider.interval=setInterval(function(){if(slider.settings.autoDirection==="next"){el.goToNextSlide()}else{el.goToPrevSlide()}},slider.settings.pause);slider.settings.onAutoChange.call(el,true);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("stop")}};el.stopAuto=function(preventControlUpdate){if(slider.autoPaused)slider.autoPaused=false;if(!slider.interval){return}clearInterval(slider.interval);slider.interval=null;slider.settings.onAutoChange.call(el,false);if(slider.settings.autoControls&&preventControlUpdate!==true){updateAutoControls("start")}};el.getCurrentSlide=function(){return slider.active.index};el.getCurrentSlideElement=function(){return slider.children.eq(slider.active.index)};el.getSlideElement=function(index){return slider.children.eq(index)};el.getSlideCount=function(){return slider.children.length};el.isWorking=function(){return slider.working};el.redrawSlider=function(){if(slider.debug)console.log(slider.logAs,"redrawSlider");updateWidth();unsetSlideHeight();setViewportHeight();if(slider.settings.stretch){setSlideHeight()}slider.children.add(el.find(".wpmslider-clone")).outerWidth(getSlideWidth2());setSlidePosition();if(slider.active.last){slider.active.index=getPagerQty()-1}if(slider.active.index>=getPagerQty()){slider.active.last=true}if(slider.settings.pager&&!slider.settings.pagerCustom){populatePager();updatePagerActive(slider.active.index)}if(slider.settings.ariaHidden){applyAriaHiddenAttributes(slider.active.index*getMoveBy())}};el.destroySlider=function(){if(!slider.initialized){return}slider.initialized=false;$(".wpmslider-clone",this).remove();slider.children.each(function(){if($(this).data("origStyle")!==undefined){$(this).attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}});if($(this).data("origStyle")!==undefined){this.attr("style",$(this).data("origStyle"))}else{$(this).removeAttr("style")}$(this).unwrap().unwrap();if(slider.controls.el){slider.controls.el.remove()}if(slider.controls.next){slider.controls.next.remove()}if(slider.controls.prev){slider.controls.prev.remove()}if(slider.pagerEl&&slider.settings.controls&&!slider.settings.pagerCustom){slider.pagerEl.remove()}$(".wpmslider-caption",this).remove();if(slider.controls.autoEl){slider.controls.autoEl.remove()}clearInterval(slider.interval);clearInterval(slider.visibilityInterval);if(slider.settings.responsive){$(window).off("resize",resizeWindow)}if(slider.settings.keyboardEnabled){$(document).off("keydown",keyPress)}$(this).removeData("strongSlider")};el.reloadSlider=function(settings){if(settings!==undefined){options=settings}el.destroySlider();init();$(el).data("strongSlider",this)};init();$(el).data("strongSlider",this);viewEl.attr("data-state","init");if(slider.debug)console.log(slider.logAs,"viewport",verge.viewportW(),"x",verge.viewportH());return this}})(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: testimonials, testimonial slider, testimonial form, reviews, star ratings
4
  Requires at least: 3.7
5
  Requires PHP: 5.2.4
6
  Tested up to: 5.0
7
- Stable tag: 2.32.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -215,6 +215,9 @@ If you prefer, start a private support ticket at [support.strongplugins.com](htt
215
 
216
  == Changelog ==
217
 
 
 
 
218
  = 2.32.3 - Dec 4, 2018 =
219
  * Fix stretched slide height in carousel.
220
 
@@ -228,62 +231,6 @@ If you prefer, start a private support ticket at [support.strongplugins.com](htt
228
  * Add carousel option.
229
  * Add filters to form field classes.
230
 
231
- = 2.31.10 - Aug 2, 2018 =
232
- * Fix singular/plural phrases in testimonial average shortcode.
233
- * Fix bug in scroll to success message.
234
- * Fix RTL slider controls.
235
- * Attempt to fix slider touch problems in iOS.
236
-
237
- = 2.31.9 - July 17, 2018 =
238
- * Fix compatbility issue with Gutenberg.
239
- * Fix bug in average rating calculation.
240
- * Fix CSS columns for recent browser updates.
241
- * Fix bug in lazy-loading compatibility option.
242
- * Improve theme compatibility.
243
- * Add filter on form submit button CSS class.
244
-
245
- = 2.31.8 - June 16, 2018 =
246
- * Fix "wait" spinner in unstyled form template.
247
- * On forms, only show required symbol if field label is shown.
248
- * Refactor inline style method.
249
- * Improve exception handling.
250
-
251
- = 2.31.7 - June 7, 2018 =
252
- * Fix JavaScript incompatibility in IE and Edge.
253
-
254
- = 2.31.6 - June 2, 2018 =
255
- * Fix bug when adding a custom field in view editor.
256
-
257
- = 2.31.5 - June 1, 2018 =
258
- * Fix XSS vulnerablilities reported by DefenseCode using Thunderscan.
259
- * Add spinner UI element while form is being submitted to deter visitor from navigating away.
260
- * Minor admin UI improvements.
261
-
262
- = 2.31.4 - May 22, 2018 =
263
- * Add integration with WordPress privacy exporter and eraser features.
264
-
265
- = 2.31.3 - May 19, 2018 =
266
- * Fix missing submit button.
267
-
268
- = 2.31.2 - May 18, 2018 =
269
- * Fix bug in average rating half-star.
270
-
271
- = 2.31.1 - May 15, 2018 =
272
- * Fix conflict with Review Markup add-on.
273
-
274
- = 2.31 - May 15, 2018 =
275
- * Add `[testimonial_average_rating]` shortcode.
276
- * Add compatibility option for script controller.
277
- * Add compatibility option for lazy loading images.
278
- * Minor template style tweaks for small screens.
279
- * Use empty star icon instead of full icon in different color.
280
- * Change default message "Required field" to "Required".
281
- * Improve exception handling.
282
- * Improve Pjax compatibility.
283
- * Apply JavaScript coding standard.
284
- * Add console logging for slider when `SCRIPT_DEBUG` enabled.
285
- * Minor admin style tweaks.
286
-
287
  See changelog.txt for previous versions.
288
 
289
  == Upgrade Notice ==
@@ -299,3 +246,6 @@ New adjustable responsive breakpoints for carousels.
299
 
300
  = 2.32.3 =
301
  Fix stretched slide height in carousel.
 
 
 
4
  Requires at least: 3.7
5
  Requires PHP: 5.2.4
6
  Tested up to: 5.0
7
+ Stable tag: 2.32.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
215
 
216
  == Changelog ==
217
 
218
+ = 2.32.4 - Dec. 27, 2018 =
219
+ * Prerender shortcodes in WordPress Custom HTML widgets.
220
+
221
  = 2.32.3 - Dec 4, 2018 =
222
  * Fix stretched slide height in carousel.
223
 
231
  * Add carousel option.
232
  * Add filters to form field classes.
233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  See changelog.txt for previous versions.
235
 
236
  == Upgrade Notice ==
246
 
247
  = 2.32.3 =
248
  Fix stretched slide height in carousel.
249
+
250
+ = 2.32.4 =
251
+ Improved compatibility with WordPress Custom HTML widgets.
strong-testimonials.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
- * Version: 2.32.3
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  exit;
35
  }
36
 
37
- define( 'WPMTST_VERSION', '2.32.3' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );
4
  * Plugin URI: https://strongplugins.com/plugins/strong-testimonials/
5
  * Description: Collect and display your testimonials or reviews.
6
  * Author: Chris Dillon
7
+ * Version: 2.32.4
8
  *
9
  * Author URI: https://strongplugins.com/
10
  * Text Domain: strong-testimonials
34
  exit;
35
  }
36
 
37
+ define( 'WPMTST_VERSION', '2.32.4' );
38
  define( 'WPMTST_PLUGIN', plugin_basename( __FILE__ ) ); // strong-testimonials/strong-testimonials.php
39
  define( 'WPMTST', dirname( WPMTST_PLUGIN ) ); // strong-testimonials
40
  define( 'STRONGPLUGINS_STORE_URL', 'https://strongplugins.com' );