1/* Define global Variable */ 2var wtpsw_next_arrow = '<span class="slick-next slick-arrow" data-role="none" tabindex="0" role="button"><svg fill="currentColor" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg"><title/><path d="M69.8437,43.3876,33.8422,13.3863a6.0035,6.0035,0,0,0-7.6878,9.223l30.47,25.39-30.47,25.39a6.0035,6.0035,0,0,0,7.6878,9.2231L69.8437,52.6106a6.0091,6.0091,0,0,0,0-9.223Z"/></svg></span>'; 3var wtpsw_prev_arrow = '<span class="slick-prev slick-arrow" data-role="none" tabindex="0" role="button"><svg fill="currentColor" viewBox="0 0 96 96" xmlns="http://www.w3.org/2000/svg"><title/><path d="M39.3756,48.0022l30.47-25.39a6.0035,6.0035,0,0,0-7.6878-9.223L26.1563,43.3906a6.0092,6.0092,0,0,0,0,9.2231L62.1578,82.615a6.0035,6.0035,0,0,0,7.6878-9.2231Z"/></svg></span>'; 4 5( function($) { 6 7 "use strict"; 8 9 /* Post views count ajax */ 10 if( Wtpsw.post_view_count != 0 ) { 11 12 var data = { 13 action : 'wtpsw_post_view_count', 14 is_ajax : 1, 15 post_id : Wtpsw.post_view_count, 16 nonce : Wtpsw.data_nonce, 17 }; 18 19 $.post(Wtpsw.ajaxurl,data,function(response) { 20 /* Do Response Process */ 21 }); 22 } 23 24 /* For Trending Post Slider */ 25 wtpsw_trending_slider_init(); 26 27 /* For Trending Post carousel */ 28 wtpsw_trending_carousel_init(); 29 30 /* Elementor Compatibility */ 31 /***** Elementor Compatibility Start *****/ 32 if( Wtpsw.elementor_preview == 0 ) { 33 34 $(window).on('elementor/frontend/init', function() { 35 36 /* Tweak for Slick Slider */ 37 $('.wtpsw-post-slider-init').each(function( index ) { 38 39 /* Tweak for Vertical Tab */ 40 $(this).closest('.elementor-tabs-content-wrapper').addClass('wtpsw-elementor-tab-wrap'); 41 42 var slider_id = $(this).attr('id'); 43 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 44 45 setTimeout(function() { 46 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 47 $('#'+slider_id).slick( 'setPosition' ); 48 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 49 } 50 }, 350); 51 }); 52 }); 53 } 54 55 $(document).on('click', '.elementor-tab-title', function() { 56 57 var ele_control = $(this).attr('aria-controls'); 58 var slider_wrap = $('#'+ele_control).find('.wtpsw-post-slider-init'); 59 60 /* Tweak for slick slider */ 61 $( slider_wrap ).each(function( index ) { 62 var slider_id = $(this).attr('id'); 63 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 64 65 setTimeout(function() { 66 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 67 $('#'+slider_id).slick( 'setPosition' ); 68 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 69 } 70 }, 350); 71 72 }); 73 }); 74 75 76 /* Beaver Builder Compatibility for Accordion and Tabs */ 77 $(document).on('click', '.fl-accordion-button, .fl-tabs-label', function() { 78 79 var ele_control = $(this).attr('aria-controls'); 80 var slider_wrap = $('#'+ele_control).find('.wtpsw-post-slider-init'); 81 82 /* Tweak for filter */ 83 $( slider_wrap ).each(function( index ) { 84 85 var slider_id = $(this).attr('id'); 86 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 87 88 setTimeout(function() { 89 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 90 $('#'+slider_id).slick( 'setPosition' ); 91 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 92 } 93 }, 300); 94 }); 95 }); 96 97 /* SiteOrigin Compatibility For Accordion Panel */ 98 $(document).on('click', '.sow-accordion-panel', function() { 99 100 var ele_control = $(this).attr('data-anchor'); 101 var slider_wrap = $('#accordion-content-'+ele_control).find('.wtpsw-post-slider-init'); 102 103 /* Tweak for slick slider */ 104 $( slider_wrap ).each(function( index ) { 105 106 var slider_id = $(this).attr('id'); 107 108 /* Tweak for slick slider */ 109 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 110 $('#'+slider_id).slick( 'setPosition' ); 111 } 112 }); 113 }); 114 115 /* SiteOrigin Compatibility for Tab Panel */ 116 $(document).on('click focus', '.sow-tabs-tab', function() { 117 var sel_index = $(this).index(); 118 var cls_ele = $(this).closest('.sow-tabs'); 119 var tab_cnt = cls_ele.find('.sow-tabs-panel').eq( sel_index ); 120 var slider_wrap = tab_cnt.find('.wtpsw-post-slider-init'); 121 122 /* Tweak for slick slider */ 123 $( slider_wrap ).each(function( index ) { 124 125 var slider_id = $(this).attr('id'); 126 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 127 128 setTimeout(function() { 129 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 130 $('#'+slider_id).slick( 'setPosition' ); 131 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 132 } 133 }, 300); 134 }); 135 }); 136 137 /* Divi Builder Compatibility for Accordion & Toggle */ 138 $(document).on('click', '.et_pb_toggle', function() { 139 140 var acc_cont = $(this).find('.et_pb_toggle_content'); 141 var slider_wrap = acc_cont.find('.wtpsw-post-slider-init'); 142 143 /* Tweak for slick slider */ 144 $( slider_wrap ).each(function( index ) { 145 146 var slider_id = $(this).attr('id'); 147 148 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 149 $('#'+slider_id).slick( 'setPosition' ); 150 } 151 }); 152 }); 153 154 /* Divi Builder Compatibility for Tabs */ 155 $('.et_pb_tabs_controls li a').on('click', function() { 156 var cls_ele = $(this).closest('.et_pb_tabs'); 157 var tab_cls = $(this).closest('li').attr('class'); 158 var tab_cont = cls_ele.find('.et_pb_all_tabs .'+tab_cls); 159 var slider_wrap = tab_cont.find('.wtpsw-post-slider-init'); 160 161 setTimeout(function() { 162 163 /* Tweak for slick slider */ 164 $( slider_wrap ).each(function( index ) { 165 166 var slider_id = $(this).attr('id'); 167 168 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 169 $('#'+slider_id).slick( 'setPosition' ); 170 } 171 }); 172 }, 550); 173 }); 174 175 /* Fusion Builder Compatibility for Tabs */ 176 $(document).on('click', '.fusion-tabs li .tab-link', function() { 177 var cls_ele = $(this).closest('.fusion-tabs'); 178 var tab_id = $(this).attr('href'); 179 var tab_cont = cls_ele.find(tab_id); 180 var slider_wrap = tab_cont.find('.wtpsw-post-slider-init'); 181 182 /* Tweak for slick slider */ 183 $( slider_wrap ).each(function( index ) { 184 var slider_id = $(this).attr('id'); 185 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 186 187 setTimeout(function() { 188 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 189 $('#'+slider_id).slick( 'setPosition' ); 190 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 191 $('#'+slider_id).slick( 'setPosition' ); 192 } 193 }, 200); 194 }); 195 }); 196 197 /* Fusion Builder Compatibility for Toggles */ 198 $(document).on('click', '.fusion-accordian .panel-heading a', function() { 199 var cls_ele = $(this).closest('.fusion-accordian'); 200 var tab_id = $(this).attr('href'); 201 var tab_cont = cls_ele.find(tab_id); 202 var slider_wrap = tab_cont.find('.wtpsw-post-slider-init'); 203 204 /* Tweak for slick slider */ 205 $( slider_wrap ).each(function( index ) { 206 var slider_id = $(this).attr('id'); 207 $('#'+slider_id).css({'visibility': 'hidden', 'opacity': 0}); 208 209 setTimeout(function() { 210 if( typeof(slider_id) !== 'undefined' && slider_id != '' ) { 211 $('#'+slider_id).slick( 'setPosition' ); 212 $('#'+slider_id).css({'visibility': 'visible', 'opacity': 1}); 213 $('#'+slider_id).slick( 'setPosition' ); 214 } 215 }, 200); 216 }); 217 }); 218 219})(jQuery); 220 221/* Function to Initialize Featured Post Slider */ 222function wtpsw_trending_slider_init() { 223 /* For Trending Post Slider */ 224 jQuery( '.wtpsw-post-slider' ).each(function( index ) { 225 226 if( jQuery(this).hasClass('slick-initialized') ) { 227 return; 228 } 229 230 /* flex Condition */ 231 if(Wtpsw.is_avada == 1) { 232 jQuery(this).closest('.fusion-flex-container').addClass('wtpsw-fusion-flex'); 233 } 234 235 var slider_id = jQuery(this).attr('id'); 236 var slider_conf = jQuery.parseJSON( jQuery(this).attr('data-conf')); 237 238 if( typeof(slider_id) != 'undefined' && slider_id != '' ) { 239 jQuery('#'+slider_id).slick({ 240 infinite : true, 241 slidesToShow : 1, 242 slidesToScroll : 1, 243 dots : ( slider_conf.dots == "true" ) ? true : false, 244 arrows : ( slider_conf.arrows == "true" ) ? true : false, 245 autoplay : ( slider_conf.autoplay == "true" ) ? true : false, 246 speed : parseInt(slider_conf.speed), 247 autoplaySpeed : parseInt( slider_conf.autoplayinterval ), 248 nextArrow : wtpsw_next_arrow, 249 prevArrow : wtpsw_prev_arrow, 250 rtl : ( Wtpsw.is_rtl == 1 ) ? true : false, 251 }); 252 } 253 }); 254} 255 256/* Function to Initialize Featured Post Slider */ 257function wtpsw_trending_carousel_init() { 258 /* For Trending Post Carousel */ 259 jQuery( '.wtpsw-post-carousel' ).each(function( index ) { 260 261 if( jQuery(this).hasClass('slick-initialized') ) { 262 return; 263 } 264 265 /* flex Condition */ 266 if(Wtpsw.is_avada == 1) { 267 jQuery(this).closest('.fusion-flex-container').addClass('wtpsw-fusion-flex'); 268 } 269 270 var slider_id = jQuery(this).attr('id'); 271 var slider_conf = jQuery.parseJSON( jQuery(this).attr('data-conf')); 272 273 if( typeof(slider_id) != 'undefined' && slider_id != '' ) { 274 jQuery('#'+slider_id).slick({ 275 infinite : true, 276 dots : ( slider_conf.dots == "true" ) ? true : false, 277 arrows : ( slider_conf.arrows == "true" ) ? true : false, 278 autoplay : ( slider_conf.autoplay == "true" ) ? true : false, 279 speed : parseInt( slider_conf.speed ), 280 autoplaySpeed : parseInt( slider_conf.autoplayinterval ), 281 slidesToShow : parseInt( slider_conf.slides_to_show ), 282 slidesToScroll : parseInt( slider_conf.slides_to_scroll ), 283 nextArrow : wtpsw_next_arrow, 284 prevArrow : wtpsw_prev_arrow, 285 rtl : ( Wtpsw.is_rtl == 1 ) ? true : false, 286 mobileFirst : ( Wtpsw.is_mobile == 1 ) ? true : false, 287 responsive: [{ 288 breakpoint: 767, 289 settings: { 290 slidesToShow: (parseInt(slider_conf.slides_to_show) > 3) ? 3 : parseInt(slider_conf.slides_to_show), 291 slidesToScroll: 1, 292 dots: true 293 } 294 }, 295 { 296 breakpoint: 640, 297 settings: { 298 slidesToShow: (parseInt(slider_conf.slides_to_show) > 2) ? 2 : parseInt(slider_conf.slides_to_show), 299 slidesToScroll: 1 300 } 301 }, 302 { 303 breakpoint: 479, 304 settings: { 305 slidesToShow: 1, 306 slidesToScroll: 1 307 } 308 }, 309 { 310 breakpoint: 319, 311 settings: { 312 slidesToShow: 1, 313 slidesToScroll: 1 314 } 315 } 316 ] 317 }); 318 } 319 }); 320}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.