Premium Addons for Elementor - Version 3.11.0

Version Description

  • Tweak: Added Filter Rules (Match/Exclude) options for Authors, Categories and Tags in Blog widget.
  • Tweak: Added Enable Pagination Next/Prev Strings option in Blog widget.
  • Tweak: Added Background Color option for active page in Blog widget.
  • Tweak: Pagination number styling improved for better pagination experience in Blog widget.
  • Tweak: Added Image Size option in Banner widget.
  • Tweak: Videos in Media Grid widget are now loaded only when an image is clicked to optimize page loading speed and size.
  • Fixed: Background Color not applied on Triangle Ribbon in Pricing Table widget.
Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 3.11.0
Comparing to
See all releases

Code changes from version 3.10.9 to 3.11.0

assets/frontend/css/premium-addons.css CHANGED
@@ -1988,33 +1988,45 @@ button.premium-modal-box-modal-close {
1988
  margin-top: -30px;
1989
  text-align: right;
1990
  }
1991
- .premium-blog-pagination-container ul {
1992
- list-style: none;
 
 
 
 
 
1993
  margin: 0;
 
1994
  padding: 0;
 
 
 
 
 
1995
  }
1996
  .premium-blog-pagination-container li {
1997
- display: inline-block;
1998
- margin-right: 10px;
1999
- margin-bottom: 5px;
2000
- padding: 3px 7px;
2001
- -webkit-transition: all 0.3s ease-in-out;
2002
- -moz-transition: all 0.3s ease-in-out;
2003
- -ms-transition: all 0.3s ease-in-out;
2004
- -o-transition: all 0.3s ease-in-out;
2005
- transition: all 0.3s ease-in-out;
2006
  }
2007
  .premium-blog-pagination-container li span {
2008
  cursor: default;
2009
  }
2010
- .premium-blog-pagination-container li a, .premium-blog-pagination-container li span {
2011
- font-size: 16px;
2012
- display: inline-block;
2013
- -webkit-transition: all 0.3s ease-in-out;
2014
- -moz-transition: all 0.3s ease-in-out;
2015
- -ms-transition: all 0.3s ease-in-out;
2016
- -o-transition: all 0.3s ease-in-out;
2017
- transition: all 0.3s ease-in-out;
 
 
 
 
 
 
 
2018
  }
2019
  .premium-blog-wrap {
2020
  display: -ms-flexbox;
1988
  margin-top: -30px;
1989
  text-align: right;
1990
  }
1991
+ .premium-blog-pagination-container ul.page-numbers {
1992
+ display: -ms-flexbox;
1993
+ display: -webkit-flex;
1994
+ display: -moz-flex;
1995
+ display: -ms-flex;
1996
+ display: flex;
1997
+ list-style-type: none;
1998
  margin: 0;
1999
+ margin-top: 10px;
2000
  padding: 0;
2001
+ border: none;
2002
+ -webkit-justify-content: center;
2003
+ -moz-justify-content: center;
2004
+ -ms-justify-content: center;
2005
+ justify-content: center;
2006
  }
2007
  .premium-blog-pagination-container li {
2008
+ margin: 0 0.4em 0.4em 0;
2009
+ padding: 0;
2010
+ text-align: center;
 
 
 
 
 
 
2011
  }
2012
  .premium-blog-pagination-container li span {
2013
  cursor: default;
2014
  }
2015
+ .premium-blog-pagination-container li .page-numbers {
2016
+ margin: 0;
2017
+ text-decoration: none;
2018
+ color: #000;
2019
+ padding: 0;
2020
+ line-height: 1;
2021
+ font-size: 1em;
2022
+ font-weight: 400;
2023
+ padding: .75em;
2024
+ display: block;
2025
+ min-width: 2.5em;
2026
+ -webkit-transition: all 0.2s ease-in-out;
2027
+ -moz-transition: all 0.2s ease-in-out;
2028
+ -mos-transition: all 0.2s ease-in-out;
2029
+ transition: all 0.2s ease-in-out;
2030
  }
2031
  .premium-blog-wrap {
2032
  display: -ms-flexbox;
assets/frontend/js/premium-addons.js CHANGED
@@ -1,53 +1,41 @@
1
- (function($) {
2
  /****** Premium Progress Bar Handler ******/
3
- var PremiumProgressBarWidgetHandler = function($scope, $) {
4
- var progressbarElement = $scope
5
- .find(".premium-progressbar-progress-bar")
6
- .each(function() {
7
- var settings = $(this).data("settings"),
8
- length = settings["progress_length"],
9
- speed = settings["speed"];
10
-
11
- $(this).animate({ width: length + "%" }, speed);
12
- });
13
  };
14
-
15
  /****** Premium Progress Bar Scroll Handler *****/
16
- var PremiumProgressBarScrollWidgetHandler = function($scope, $) {
17
- elementorFrontend.waypoint(
18
- $scope,
19
- function() {
20
- PremiumProgressBarWidgetHandler($(this), $);
21
- },
22
- {
23
- offset: Waypoint.viewportHeight() - 150,
24
- triggerOnce: true
25
- }
26
- );
27
  };
28
-
29
  /****** Premium Video Box Handler ******/
30
- var PremiumVideoBoxWidgetHandler = function($scope, $) {
31
  var videoBoxElement = $scope.find(".premium-video-box-container"),
32
- videoContainer = videoBoxElement.find(
33
- ".premium-video-box-video-container"
34
- ),
35
  type = videoBoxElement.data("type"),
36
- video,
37
- vidSrc,
38
- checkRel;
39
- videoBoxElement.on("click", function() {
40
  if ("self" === type) {
41
  video = videoContainer.find("video");
42
  vidSrc = video.attr("src");
43
- $(video)
44
- .get(0)
45
- .play();
46
  videoContainer.css({
47
  opacity: "1",
48
  visibility: "visible"
49
  });
50
- } else {
 
51
  vidSrc = videoContainer.data("src");
52
  vidSrc = vidSrc + "&autoplay=1";
53
  var iframe = $("<iframe/>");
@@ -59,12 +47,13 @@
59
  videoContainer.css("background", "#000");
60
  videoContainer.html(iframe);
61
  }
62
- videoBoxElement.find(".premium-video-box-image-container, .premium-video-box-play-icon-container").remove();
 
 
63
  });
64
  };
65
-
66
  /****** Premium Grid Handler ******/
67
- var PremiumGridWidgetHandler = function($scope, $) {
68
  var galleryElement = $scope.find(".premium-gallery-container"),
69
  gridSettings = galleryElement.data("settings"),
70
  layout = gridSettings["img_size"],
@@ -78,245 +67,187 @@
78
  counter = minimum,
79
  ltrMode = gridSettings["ltr_mode"],
80
  shuffle = gridSettings["shuffle"];
81
-
82
  if (layout === "metro") {
83
  var suffix = "";
84
-
85
  if ("tablet" === deviceType) {
86
  suffix = "_tablet";
87
- } else if ("mobile" === deviceType) {
 
88
  suffix = "_mobile";
89
  }
90
  var gridWidth = galleryElement.width(),
91
  cellSize = Math.floor(gridWidth / 12);
92
-
93
- galleryElement
94
- .find(".premium-gallery-item")
95
- .each(function( index, item ) {
96
- var cells = $(item).data("metro")[ "cells" + suffix ],
97
- vCells = $(item).data("metro")[ "vcells" + suffix ];
98
-
99
- if ( "" == cells || undefined == cells ) {
100
- var cells = $( item ).data("metro")[ "cells" ];
101
- }
102
- if ( "" == vCells || undefined == vCells ) {
103
- var vCells = $( item ).data("metro")[ "vcells" ];
104
- }
105
- $( item ).css({
106
- width: Math.ceil( cells * cellSize ),
107
- height: Math.ceil( vCells * cellSize )
108
- });
109
  });
110
-
111
  layout = "masonry";
112
  columnWidth = cellSize;
113
  }
114
-
115
- galleryElement
116
- .imagesLoaded(function() {})
117
- .done(function() {
118
- galleryElement.isotope({
119
- itemSelector: ".premium-gallery-item",
120
- percentPosition: true,
121
- animationOptions: {
122
- duration: 750,
123
- easing: "linear"
124
- },
125
- filter: gridSettings["active_cat"],
126
- layoutMode: layout,
127
- originLeft: ltrMode,
128
- masonry: {
129
- columnWidth: columnWidth
130
- },
131
- sortBy: gridSettings["sort_by"]
132
- });
133
  });
134
-
135
  if (loadMore) {
136
- galleryElement
137
- .parent()
138
- .find(".premium-gallery-load-more div")
139
- .addClass("premium-gallery-item-hidden");
140
-
141
  if (galleryElement.find(".premium-gallery-item").length > minimum) {
142
- galleryElement
143
- .parent()
144
- .find(".premium-gallery-load-more")
145
- .removeClass("premium-gallery-item-hidden");
146
- galleryElement
147
- .find(".premium-gallery-item:gt(" + (minimum - 1) + ")")
148
- .addClass("premium-gallery-item-hidden");
149
 
150
  function appendItems(imagesToShow) {
151
  var instance = galleryElement.data("isotope");
152
-
153
- galleryElement
154
- .find(".premium-gallery-item-hidden")
155
- .removeClass("premium-gallery-item-hidden");
156
-
157
- galleryElement
158
- .parent()
159
- .find(".premium-gallery-load-more")
160
- .removeClass("premium-gallery-item-hidden");
161
-
162
- var itemsToHide = instance.filteredItems
163
- .slice(imagesToShow, instance.filteredItems.length)
164
- .map(function(item) {
165
- return item.element;
166
- });
167
-
168
  $(itemsToHide).addClass("premium-gallery-item-hidden");
169
-
170
  galleryElement.isotope("layout");
171
-
172
  if (0 == itemsToHide) {
173
- galleryElement
174
- .parent()
175
- .find(".premium-gallery-load-more")
176
- .addClass("premium-gallery-item-hidden");
177
  }
178
  }
179
-
180
- galleryElement
181
- .parent()
182
- .on("click", ".premium-gallery-load-more-btn", function() {
183
- if (isFilterClicked) {
184
- counter = minimum;
185
- isFilterClicked = false;
186
- } else {
187
- counter = counter;
 
 
 
 
 
 
 
 
 
 
 
188
  }
189
-
190
- counter = counter + imageToShow;
191
-
192
- $.ajax({
193
- url: appendItems(counter),
194
- beforeSend: function() {
195
- galleryElement
196
- .parent()
197
- .find(".premium-gallery-load-more div")
198
- .removeClass("premium-gallery-item-hidden");
199
- },
200
- success: function() {
201
- galleryElement
202
- .parent()
203
- .find(".premium-gallery-load-more div")
204
- .addClass("premium-gallery-item-hidden");
205
- }
206
- });
207
  });
 
208
  }
209
  }
210
-
211
- if ("yes" !== gridSettings["light_box"]) {
212
- galleryElement
213
- .find(".premium-gallery-video-wrap")
214
- .each(function(index, item) {
215
- var type = $(item).data("type");
216
-
217
- $(item)
218
- .closest(".premium-gallery-item")
219
- .on("click", function() {
220
- var $this = $(this);
221
-
222
- $this
223
- .find(".pa-gallery-img")
224
- .css("background", "#000");
225
-
226
- $this
227
- .find(
228
- "img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper, .premium-gallery-caption"
229
- )
230
- .css("visibility", "hidden");
231
-
232
- if ("hosted" !== type) {
233
- var $iframe = $(item).find("iframe"),
234
- src = $iframe.attr("src");
235
-
236
- src = src.replace("&mute", "&autoplay=1&mute");
237
- $iframe.attr("src", src);
238
- $iframe.css("visibility", "visible");
239
- } else {
240
- var $video = $(item).find("video");
241
- $video.get(0).play();
242
- $video.css("visibility", "visible");
243
- }
244
- });
245
  });
 
246
  }
247
-
248
- $scope.find(".premium-gallery-cats-container li a").click(function(e) {
249
  e.preventDefault();
250
-
251
  isFilterClicked = true;
252
-
253
  //Showing all images of category
254
- $scope
255
- .find(".premium-gallery-cats-container li .active")
256
- .removeClass("active");
257
-
258
  $(this).addClass("active");
259
-
260
  filter = $(this).attr("data-filter");
261
-
262
- galleryElement.isotope({ filter: filter });
263
-
264
  if (shuffle) {
265
  galleryElement.isotope("shuffle");
266
  }
267
-
268
  if (loadMore) appendItems(minimum);
269
-
270
  return false;
271
  });
272
-
273
  if ("default" === gridSettings["lightbox_type"]) {
274
- $scope
275
- .find(".premium-img-gallery a[data-rel^='prettyPhoto']")
276
- .prettyPhoto({
277
- theme: gridSettings["theme"],
278
- hook: "data-rel",
279
- opacity: 0.7,
280
- show_title: false,
281
- deeplinking: false,
282
- overlay_gallery: gridSettings["overlay"],
283
- custom_markup: "",
284
- default_width: 900,
285
- default_height: 506,
286
- social_tools: ""
287
- });
288
  }
289
  };
290
-
291
  /****** Premium Counter Handler ******/
292
- var PremiumCounterHandler = function($scope, $) {
293
  var counterElement = $scope.find(".premium-counter");
294
- elementorFrontend.waypoint(counterElement, function() {
295
  var counterSettings = counterElement.data(),
296
  incrementElement = counterElement.find(".premium-counter-init"),
297
  iconElement = counterElement.find(".icon");
298
  $(incrementElement).numerator(counterSettings);
299
- $(iconElement).addClass(
300
- "animated " + iconElement.data("animation")
301
- );
302
  });
303
  };
304
-
305
  /****** Premium Fancy Text Handler ******/
306
- var PremiumFancyTextHandler = function($scope, $) {
307
  var $elem = $scope.find(".premium-fancy-text-wrapper");
308
  var settings = $elem.data("settings");
 
309
  function escapeHtml(unsafe) {
310
- return unsafe
311
- .replace(/&/g, "&amp;")
312
- .replace(/</g, "&lt;")
313
- .replace(/>/g, "&gt;")
314
- .replace(/"/g, "&quot;")
315
- .replace(/'/g, "&#039;");
316
  }
317
- if ( settings["effect"] === "typing" ) {
318
  var fancyStrings = [];
319
- settings["strings"].forEach(function(item) {
320
  fancyStrings.push(escapeHtml(item));
321
  });
322
  $elem.find(".premium-fancy-text").typed({
@@ -329,7 +260,8 @@
329
  cursorChar: settings["cursorChar"],
330
  loop: settings["loop"]
331
  });
332
- } else if ( settings["effect"] === "slide" ) {
 
333
  $elem.find(".premium-fancy-text").vTicker({
334
  speed: settings["speed"],
335
  showItems: settings["showItems"],
@@ -337,132 +269,102 @@
337
  mousePause: settings["mousePause"],
338
  direction: "up"
339
  });
340
- } else {
341
-
342
  setFancyAnimation();
343
-
344
  function setFancyAnimation() {
345
-
346
- var effect = settings.effect,
347
- $item = $elem.find(".premium-fancy-list-items"),
348
  current = 0;
349
-
350
- var delay = ( settings.delay || 2.5 ) * 1000;
351
-
352
- if( "bar" === effect )
353
- $elem.find( ".premium-fancy-text-items-wrapper" ).addClass("active");
354
-
355
- setInterval( function() {
356
-
357
- // $elem.find( ".premium-fancy-text-items-wrapper" ).css("width", $item.eq( current ).outerWidth() );
358
-
359
- if( "bar" === effect )
360
- $elem.find( ".premium-fancy-text-items-wrapper" ).addClass("active");
361
-
362
- $item.eq( current ).addClass( "premium-fancy-item-visible" ).removeClass( "premium-fancy-item-hidden" );
363
-
364
  var $inactiveItems = $item.filter(function (index) {
365
  return index !== current;
366
  });
367
-
368
- $inactiveItems.addClass( "premium-fancy-item-hidden" ).removeClass( "premium-fancy-item-visible" );
369
  current++;
370
-
371
- if( $item.length === current )
372
- current = 0;
373
-
374
- if( "bar" === effect ) {
375
- setTimeout( function() {
376
- $elem.find( ".premium-fancy-text-items-wrapper" ).removeClass("active");
377
- }, delay - 100 );
378
  }
379
-
380
- }, delay );
381
-
382
  }
383
-
384
  }
385
  };
386
-
387
  /****** Premium Countdown Handler ******/
388
- var PremiumCountDownHandler = function($scope, $) {
389
- var countDownElement = $scope
390
- .find(".premium-countdown")
391
- .each(function() {
392
- var countDownSettings = $(this).data("settings");
393
-
394
- var label1 = countDownSettings["label1"],
395
- label2 = countDownSettings["label2"],
396
- newLabe1 = label1.split(","),
397
- newLabe2 = label2.split(",");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
 
 
 
 
 
399
  if (countDownSettings["event"] === "onExpiry") {
400
- $(this)
401
- .find(".premium-countdown-init")
402
- .pre_countdown({
403
- labels: newLabe2,
404
- labels1: newLabe1,
405
- until: new Date(countDownSettings["until"]),
406
- format: countDownSettings["format"],
407
- padZeroes: true,
408
- timeSeparator: countDownSettings["separator"],
409
- onExpiry: function() {
410
- $(this).html(countDownSettings["text"]);
411
- },
412
- serverSync: function() {
413
- return new Date(
414
- countDownSettings["serverSync"]
415
- );
416
- }
417
- });
418
- } else if (countDownSettings["event"] === "expiryUrl") {
419
- $(this)
420
- .find(".premium-countdown-init")
421
- .pre_countdown({
422
- labels: newLabe2,
423
- labels1: newLabe1,
424
- until: new Date(countDownSettings["until"]),
425
- format: countDownSettings["format"],
426
- padZeroes: true,
427
- timeSeparator: countDownSettings["separator"],
428
- expiryUrl: countDownSettings["text"],
429
- serverSync: function() {
430
- return new Date(
431
- countDownSettings["serverSync"]
432
- );
433
- }
434
- });
435
- }
436
- times = $(this)
437
- .find(".premium-countdown-init")
438
- .pre_countdown("getTimes");
439
- function runTimer(el) {
440
- return el == 0;
441
  }
442
- if (times.every(runTimer)) {
443
- if (countDownSettings["event"] === "onExpiry") {
444
- $(this)
445
- .find(".premium-countdown-init")
446
- .html(countDownSettings["text"]);
447
  }
448
- if (countDownSettings["event"] === "expiryUrl") {
449
- var editMode = $("body").find("#elementor").length;
450
- if (editMode > 0) {
451
- $(this)
452
- .find(".premium-countdown-init")
453
- .html(
454
- "<h1>You can not redirect url from elementor Editor!!</h1>"
455
- );
456
- } else {
457
- window.location.href = countDownSettings["text"];
458
- }
459
  }
460
  }
461
- });
 
462
  };
463
-
464
  /****** Premium Carousel Handler ******/
465
- var PremiumCarouselHandler = function($scope, $) {
466
  var carouselElement = $scope.find(".premium-carousel-wrapper"),
467
  carouselSettings = $(carouselElement).data("settings"),
468
  isEdit = elementorFrontend.isEditMode();
@@ -470,26 +372,20 @@
470
  function slideToShow(slick) {
471
  var slidesToShow = slick.options.slidesToShow,
472
  windowWidth = $(window).width();
473
-
474
  if (windowWidth > carouselSettings["tabletBreak"]) {
475
  slidesToShow = carouselSettings["slidesDesk"];
476
  }
477
-
478
  if (windowWidth <= carouselSettings["tabletBreak"]) {
479
  slidesToShow = carouselSettings["slidesTab"];
480
  }
481
-
482
  if (windowWidth <= carouselSettings["mobileBreak"]) {
483
  slidesToShow = carouselSettings["slidesMob"];
484
  }
485
-
486
  return slidesToShow;
487
  }
488
-
489
  if (isEdit) {
490
- carouselElement.find(".item-wrapper").each(function(index, slide) {
491
- var templateID = $( slide ).data( "template" );
492
-
493
  if (undefined !== templateID) {
494
  $.ajax({
495
  type: "GET",
@@ -499,43 +395,31 @@
499
  action: "get_elementor_template_content",
500
  templateID: templateID
501
  }
502
- }).success(function(response) {
503
  var data = JSON.parse(response).data;
504
-
505
  if (undefined !== data.template_content) {
506
  $(slide).html(data.template_content);
507
-
508
- carouselElement
509
- .find(".premium-carousel-inner")
510
- .slick("refresh");
511
  }
512
  });
513
  }
514
  });
515
  }
516
-
517
- carouselElement.on("init", function( event ) {
518
  event.preventDefault();
519
-
520
- // restartAnimations();
521
-
522
-
523
- $(this)
524
- .find("item-wrapper.slick-active")
525
- .each(function() {
526
- var $this = $(this);
527
- $this.addClass($this.data("animation"));
528
- });
529
-
530
  $(".slick-track").addClass("translate");
531
  });
532
-
533
  carouselElement.find(".premium-carousel-inner").slick({
534
  vertical: carouselSettings["vertical"],
535
  slidesToScroll: carouselSettings["slidesToScroll"],
536
  slidesToShow: carouselSettings["slidesToShow"],
537
- responsive: [
538
- {
539
  breakpoint: carouselSettings["tabletBreak"],
540
  settings: {
541
  slidesToShow: carouselSettings["slidesTab"],
@@ -567,236 +451,161 @@
567
  nextArrow: carouselSettings["nextArrow"],
568
  prevArrow: carouselSettings["prevArrow"],
569
  dots: carouselSettings["dots"],
570
- customPaging: function() {
571
- return (
572
- '<i class="' + carouselSettings["customPaging"] + '"></i>'
573
- );
574
  }
575
  });
576
-
577
  function restartAnimations() {
578
-
579
- var $slides = carouselElement.find( ".premium-carousel-template" );
580
-
581
- $slides.find( ".animated" ).each( function( index, elem ) {
582
- var settings = $( elem ).data( "settings" );
583
-
584
- if( ! settings )
585
- return;
586
-
587
- if ( ! settings._animation && ! settings.animation )
588
- return;
589
-
590
  var animation = settings._animation || settings.animation;
591
-
592
- $( elem ).removeClass( "animated " + animation ).addClass( "elementor-invisible" );
593
  });
594
  };
595
-
596
  function triggerAnimation() {
597
-
598
- carouselElement.find( ".slick-active .elementor-invisible" ).each(function( index, elem ) {
599
-
600
- var settings = $( elem ).data( "settings" );
601
-
602
- if( ! settings )
603
- return;
604
-
605
- if ( ! settings._animation && ! settings.animation )
606
- return;
607
-
608
- var delay = settings._animation_delay ? settings._animation_delay : 0,
609
  animation = settings._animation || settings.animation;
610
-
611
- setTimeout(function() {
612
- $( elem ).removeClass( "elementor-invisible" ).addClass( animation + ' animated' );
613
- }, delay );
614
-
615
  });
616
-
617
  }
618
-
619
- carouselElement.on("afterChange", function( event, slick, currentSlide ) {
620
  var slidesScrolled = slick.options.slidesToScroll,
621
  slidesToShow = slideToShow(slick),
622
  centerMode = slick.options.centerMode,
623
  slideToAnimate = currentSlide + slidesToShow - 1;
624
-
625
-
626
  restartAnimations();
627
-
628
  triggerAnimation();
629
-
630
  if (slidesScrolled === 1) {
631
- if (! centerMode === true) {
632
- var $inViewPort = $(this).find(
633
- "[data-slick-index='" + slideToAnimate + "']"
634
- );
635
-
636
  if ("null" != carouselSettings["animation"]) {
637
- $inViewPort.find( "p, h1, h2, h3, h4, h5, h6, span, a, img, i, button" )
638
- .addClass(carouselSettings["animation"])
639
- .removeClass("premium-carousel-content-hidden");
640
  }
641
  }
642
- } else {
 
643
  for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
644
- $inViewPort = $(this).find( "[data-slick-index='" + i + "']" );
645
-
646
- if ("null" != carouselSettings["animation"] ) {
647
- $inViewPort
648
- .find(
649
- "p, h1, h2, h3, h4, h5, h6, span, a, img, i, button"
650
- )
651
- .addClass(carouselSettings["animation"])
652
- .removeClass("premium-carousel-content-hidden");
653
  }
654
  }
655
  }
656
  });
657
-
658
- carouselElement.on("beforeChange", function(
659
- event,
660
- slick,
661
- currentSlide
662
- ) {
663
- var $inViewPort = $(this).find(
664
- "[data-slick-index='" + currentSlide + "']"
665
- );
666
-
667
  if ("null" != carouselSettings["animation"]) {
668
- $inViewPort
669
- .siblings()
670
- .find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
671
- .removeClass(carouselSettings["animation"])
672
- .addClass("premium-carousel-content-hidden");
673
  }
674
  });
675
-
676
  if (carouselSettings["vertical"]) {
677
  var maxHeight = -1;
678
-
679
- carouselElement.find(".slick-slide").each(function() {
680
  if ($(this).height() > maxHeight) {
681
  maxHeight = $(this).height();
682
  }
683
  });
684
-
685
- carouselElement.find(".slick-slide").each(function() {
686
  if ($(this).height() < maxHeight) {
687
- $(this).css(
688
- "margin",
689
- Math.ceil((maxHeight - $(this).height()) / 2) + "px 0"
690
- );
691
  }
692
  });
693
  }
694
-
695
  var marginFix = {
696
  element: $("a.ver-carousel-arrow"),
697
- getWidth: function() {
698
  var width = this.element.outerWidth();
699
-
700
  return width / 2;
701
  },
702
- setWidth: function(type) {
703
  type = type || "vertical";
704
-
705
  if (type == "vertical") {
706
- this.element.css(
707
- "margin-left",
708
- "-" + this.getWidth() + "px"
709
- );
710
- } else {
711
- this.element.css(
712
- "margin-top",
713
- "-" + this.getWidth() + "px"
714
- );
715
  }
716
  }
717
  };
718
-
719
  marginFix.setWidth();
720
  marginFix.element = $("a.carousel-arrow");
721
  marginFix.setWidth("horizontal");
722
  };
723
-
724
  /****** Premium Banner Handler ******/
725
- var PremiumBannerHandler = function($scope, $) {
726
  var bannerElement = $scope.find(".premium-banner");
727
- bannerElement.find(".premium-banner-ib").hover(
728
- function() {
729
- $(this)
730
- .find(".premium-banner-ib-img")
731
- .addClass("active");
732
- },
733
- function() {
734
- $(this)
735
- .find(".premium-banner-ib-img")
736
- .removeClass("active");
737
- }
738
- );
739
  };
740
-
741
  /****** Premium Modal Box Handler ******/
742
- var PremiumModalBoxHandler = function($scope, $) {
743
  var modalBoxElement = $scope.find(".premium-modal-box-container"),
744
  modalBoxSettings = modalBoxElement.data("settings");
745
-
746
  if (modalBoxElement.length > 0) {
747
  if (modalBoxSettings["trigger"] === "pageload") {
748
- $(document).ready(function($) {
749
- setTimeout(function() {
750
- modalBoxElement
751
- .find(".premium-modal-box-modal")
752
- .modal();
753
  }, modalBoxSettings["delay"] * 1000);
754
  });
755
  }
756
  }
757
  };
758
-
759
  /****** Premium Blog Handler ******/
760
- var PremiumBlogHandler = function($scope, $) {
761
- var $blogElement = $scope.find(".premium-blog-wrap"),
762
- $blogPost = $blogElement.find(".premium-blog-post-outer-container"),
763
- colsNumber = $blogElement.data("col"),
764
- carousel = $blogElement.data("carousel"),
765
- grid = $blogElement.data("grid");
766
-
767
-
768
  var $metaSeparators = $blogPost.first().find(".premium-blog-meta-separator");
769
-
770
- if( 1 === $metaSeparators.length ) {
771
  $blogPost.find(".premium-blog-meta-separator").remove();
772
- } else {
773
- if( ! $blogPost.find(".fa-user").length ) {
774
- $blogPost.each(function( index, post ) {
775
- $( post ).find(".premium-blog-meta-separator").first().remove();
 
776
  });
777
  }
778
  }
779
-
780
- $scope.find( ".premium-blog-cats-container li a" ).click(function( e ) {
781
  e.preventDefault();
782
-
783
- $scope
784
- .find(".premium-blog-cats-container li .active")
785
- .removeClass("active");
786
-
787
  $(this).addClass("active");
788
-
789
- var selector = $( this ).attr("data-filter");
790
-
791
- $blogElement.isotope({ filter: selector });
792
-
793
  return false;
794
  });
795
-
796
  var masonryBlog = $blogElement.hasClass("premium-blog-masonry");
797
-
798
  if (masonryBlog && !carousel) {
799
- $blogElement.imagesLoaded(function() {
800
  $blogElement.isotope({
801
  itemSelector: ".premium-blog-post-outer-container",
802
  percentPosition: true,
@@ -808,7 +617,6 @@
808
  });
809
  });
810
  }
811
-
812
  if (carousel && grid) {
813
  var autoPlay = $blogElement.data("play"),
814
  speed = $blogElement.data("speed"),
@@ -817,22 +625,21 @@
817
  dots = $blogElement.data("dots"),
818
  prevArrow = null,
819
  nextArrow = null;
820
-
821
  if (arrows) {
822
  (prevArrow =
823
- '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>'),
824
- (nextArrow =
825
- '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>');
826
- } else {
 
 
827
  prevArrow = prevArrow = "";
828
  }
829
-
830
  $($blogElement).slick({
831
  infinite: true,
832
  slidesToShow: colsNumber,
833
  slidesToScroll: colsNumber,
834
- responsive: [
835
- {
836
  breakpoint: 769,
837
  settings: {
838
  slidesToShow: 1,
@@ -854,20 +661,17 @@
854
  fade: fade,
855
  draggable: true,
856
  dots: dots,
857
- customPaging: function() {
858
  return '<i class="fas fa-circle"></i>';
859
  }
860
  });
861
  }
862
  };
863
-
864
  /****** Premium Image Scroll ******/
865
- var PremiumImageScrollHandler = function($scope, $) {
866
  var scrollElement = $scope.find(".premium-image-scroll-container"),
867
  scrollOverlay = scrollElement.find(".premium-image-scroll-overlay"),
868
- scrollVertical = scrollElement.find(
869
- ".premium-image-scroll-vertical"
870
- ),
871
  dataElement = scrollElement.data("settings"),
872
  imageScroll = scrollElement.find("img"),
873
  direction = dataElement["direction"],
@@ -875,46 +679,39 @@
875
  transformOffset = null;
876
 
877
  function startTransform() {
878
- imageScroll.css(
879
- "transform",
880
- (direction === "vertical" ? "translateY" : "translateX") +
881
- "( -" +
882
- transformOffset +
883
- "px)"
884
- );
885
  }
886
 
887
  function endTransform() {
888
- imageScroll.css(
889
- "transform",
890
- (direction === "vertical" ? "translateY" : "translateX") +
891
- "(0px)"
892
- );
893
  }
894
 
895
  function setTransform() {
896
  if (direction === "vertical") {
897
  transformOffset = imageScroll.height() - scrollElement.height();
898
- } else {
 
899
  transformOffset = imageScroll.width() - scrollElement.width();
900
  }
901
  }
902
-
903
  if (dataElement["trigger"] === "scroll") {
904
  scrollElement.addClass("premium-container-scroll");
905
  if (direction === "vertical") {
906
  scrollVertical.addClass("premium-image-scroll-ver");
907
- } else {
908
- scrollElement.imagesLoaded(function() {
 
909
  scrollOverlay.css({
910
  width: imageScroll.width(),
911
  height: imageScroll.height()
912
  });
913
  });
914
  }
915
- } else {
 
916
  if (reverse === "yes") {
917
- scrollElement.imagesLoaded(function() {
918
  scrollElement.addClass("premium-container-scroll-instant");
919
  setTransform();
920
  startTransform();
@@ -923,58 +720,57 @@
923
  if (direction === "vertical") {
924
  scrollVertical.removeClass("premium-image-scroll-ver");
925
  }
926
- scrollElement.mouseenter(function() {
927
  scrollElement.removeClass("premium-container-scroll-instant");
928
  setTransform();
929
  reverse === "yes" ? endTransform() : startTransform();
930
  });
931
-
932
- scrollElement.mouseleave(function() {
933
  reverse === "yes" ? startTransform() : endTransform();
934
  });
935
  }
936
  };
937
-
938
- var PremiumContactFormHandler = function($scope, $) {
939
  var contactForm = $scope.find(".premium-cf7-container");
940
-
941
  var input = contactForm.find(
942
  'input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]'
943
  );
944
  input.wrap("<span class='wpcf7-span'>");
945
-
946
- input.on("focus blur", function() {
947
- $(this)
948
- .closest(".wpcf7-span")
949
- .toggleClass("is-focused");
950
  });
951
  };
952
-
953
- var PremiumPersonsHandler = function($scope, $) {
954
-
955
  var $persons = $scope.find(".multiple-persons");
956
-
957
- if( ! $persons.length )
958
- return;
959
-
960
  var carousel = $persons.data("carousel");
961
-
962
- if( carousel ) {
963
-
964
- var autoPlay = $persons.data("play"),
965
- speed = $persons.data("speed"),
966
- rtl = $persons.data("rtl"),
967
- colsNumber = $persons.data("col"),
968
- prevArrow = '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',
969
- nextArrow = '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>';
970
-
971
  $persons.slick({
972
  infinite: true,
973
  slidesToShow: colsNumber,
974
  slidesToScroll: colsNumber,
975
- responsive: [
976
- { breakpoint: 769, settings: { slidesToShow: 1, slidesToScroll: 1 } },
977
- { breakpoint: 481, settings: { slidesToShow: 1, slidesToScroll: 1 } }
 
 
 
 
 
 
 
 
 
 
 
978
  ],
979
  autoplay: autoPlay,
980
  autoplaySpeed: speed,
@@ -985,99 +781,48 @@
985
  pauseOnHover: true
986
  });
987
  }
988
-
989
- if( ! $scope.hasClass("premium-person-widget-style2") )
990
- return;
991
-
992
-
993
- if( "yes" !== $persons.data("persons-equal") )
994
- return;
995
-
996
  var heights = new Array();
997
-
998
- $persons.find( ".premium-person-style2" ).each(function( index, person ) {
999
- $( person ).imagesLoaded( function(){} ).done( function(){
1000
- var imageHeight = $( person ).find( ".premium-person-image-container" ).outerHeight();
1001
- heights.push( imageHeight );
1002
- });
1003
  });
1004
-
1005
- $persons.imagesLoaded(function(){}).done(function(){
1006
-
1007
- var maxHeight = Math.max.apply( null, heights );
1008
-
1009
- $persons.find( ".premium-person-image-wrap" ).css( "height", maxHeight + "px" );
1010
-
1011
  });
1012
-
1013
-
1014
-
1015
-
1016
  };
1017
-
1018
-
1019
  //Elementor JS Hooks
1020
- $(window).on("elementor/frontend/init", function() {
1021
- elementorFrontend.hooks.addAction(
1022
- "frontend/element_ready/premium-addon-video-box.default",
1023
- PremiumVideoBoxWidgetHandler
1024
- );
1025
- elementorFrontend.hooks.addAction(
1026
- "frontend/element_ready/premium-img-gallery.default",
1027
- PremiumGridWidgetHandler
1028
- );
1029
- elementorFrontend.hooks.addAction(
1030
- "frontend/element_ready/premium-addon-fancy-text.default",
1031
- PremiumFancyTextHandler
1032
- );
1033
- elementorFrontend.hooks.addAction(
1034
- "frontend/element_ready/premium-counter.default",
1035
- PremiumCounterHandler
1036
- );
1037
- elementorFrontend.hooks.addAction(
1038
- "frontend/element_ready/premium-countdown-timer.default",
1039
- PremiumCountDownHandler
1040
- );
1041
- elementorFrontend.hooks.addAction(
1042
- "frontend/element_ready/premium-carousel-widget.default",
1043
- PremiumCarouselHandler
1044
- );
1045
- elementorFrontend.hooks.addAction(
1046
- "frontend/element_ready/premium-addon-banner.default",
1047
- PremiumBannerHandler
1048
- );
1049
  elementorFrontend.hooks.addAction(
1050
- "frontend/element_ready/premium-addon-modal-box.default",
1051
- PremiumModalBoxHandler
1052
- );
1053
  elementorFrontend.hooks.addAction(
1054
- "frontend/element_ready/premium-addon-blog.default",
1055
- PremiumBlogHandler
1056
  );
 
1057
  elementorFrontend.hooks.addAction(
1058
- "frontend/element_ready/premium-image-scroll.default",
1059
- PremiumImageScrollHandler
1060
- );
1061
  elementorFrontend.hooks.addAction(
1062
- "frontend/element_ready/premium-contact-form.default",
1063
- PremiumContactFormHandler
1064
- );
1065
-
1066
  elementorFrontend.hooks.addAction(
1067
- "frontend/element_ready/premium-addon-person.default",
1068
- PremiumPersonsHandler
1069
- );
1070
-
 
1071
  if (elementorFrontend.isEditMode()) {
1072
  elementorFrontend.hooks.addAction(
1073
- "frontend/element_ready/premium-addon-progressbar.default",
1074
- PremiumProgressBarWidgetHandler
1075
- );
1076
- } else {
1077
  elementorFrontend.hooks.addAction(
1078
- "frontend/element_ready/premium-addon-progressbar.default",
1079
- PremiumProgressBarScrollWidgetHandler
1080
- );
1081
  }
1082
  });
1083
- })(jQuery);
1
+ (function ($) {
2
  /****** Premium Progress Bar Handler ******/
3
+ var PremiumProgressBarWidgetHandler = function ($scope, $) {
4
+ var progressbarElement = $scope.find(".premium-progressbar-progress-bar").each(function () {
5
+ var settings = $(this).data("settings"),
6
+ length = settings["progress_length"],
7
+ speed = settings["speed"];
8
+ $(this).animate({
9
+ width: length + "%"
10
+ }, speed);
11
+ });
 
12
  };
 
13
  /****** Premium Progress Bar Scroll Handler *****/
14
+ var PremiumProgressBarScrollWidgetHandler = function ($scope, $) {
15
+ elementorFrontend.waypoint($scope, function () {
16
+ PremiumProgressBarWidgetHandler($(this), $);
17
+ }, {
18
+ offset: Waypoint.viewportHeight() - 150,
19
+ triggerOnce: true
20
+ });
 
 
 
 
21
  };
 
22
  /****** Premium Video Box Handler ******/
23
+ var PremiumVideoBoxWidgetHandler = function ($scope, $) {
24
  var videoBoxElement = $scope.find(".premium-video-box-container"),
25
+ videoContainer = videoBoxElement.find(".premium-video-box-video-container"),
 
 
26
  type = videoBoxElement.data("type"),
27
+ video, vidSrc, checkRel;
28
+ videoBoxElement.on("click", function () {
 
 
29
  if ("self" === type) {
30
  video = videoContainer.find("video");
31
  vidSrc = video.attr("src");
32
+ $(video).get(0).play();
 
 
33
  videoContainer.css({
34
  opacity: "1",
35
  visibility: "visible"
36
  });
37
+ }
38
+ else {
39
  vidSrc = videoContainer.data("src");
40
  vidSrc = vidSrc + "&autoplay=1";
41
  var iframe = $("<iframe/>");
47
  videoContainer.css("background", "#000");
48
  videoContainer.html(iframe);
49
  }
50
+ videoBoxElement.find(
51
+ ".premium-video-box-image-container, .premium-video-box-play-icon-container"
52
+ ).remove();
53
  });
54
  };
 
55
  /****** Premium Grid Handler ******/
56
+ var PremiumGridWidgetHandler = function ($scope, $) {
57
  var galleryElement = $scope.find(".premium-gallery-container"),
58
  gridSettings = galleryElement.data("settings"),
59
  layout = gridSettings["img_size"],
67
  counter = minimum,
68
  ltrMode = gridSettings["ltr_mode"],
69
  shuffle = gridSettings["shuffle"];
 
70
  if (layout === "metro") {
71
  var suffix = "";
 
72
  if ("tablet" === deviceType) {
73
  suffix = "_tablet";
74
+ }
75
+ else if ("mobile" === deviceType) {
76
  suffix = "_mobile";
77
  }
78
  var gridWidth = galleryElement.width(),
79
  cellSize = Math.floor(gridWidth / 12);
80
+ galleryElement.find(".premium-gallery-item").each(function (index, item) {
81
+ var cells = $(item).data("metro")["cells" + suffix],
82
+ vCells = $(item).data("metro")["vcells" + suffix];
83
+ if ("" == cells || undefined == cells) {
84
+ var cells = $(item).data("metro")["cells"];
85
+ }
86
+ if ("" == vCells || undefined == vCells) {
87
+ var vCells = $(item).data("metro")["vcells"];
88
+ }
89
+ $(item).css({
90
+ width: Math.ceil(cells * cellSize),
91
+ height: Math.ceil(vCells * cellSize)
 
 
 
 
 
92
  });
93
+ });
94
  layout = "masonry";
95
  columnWidth = cellSize;
96
  }
97
+ galleryElement.imagesLoaded(function () {}).done(function () {
98
+ galleryElement.isotope({
99
+ itemSelector: ".premium-gallery-item",
100
+ percentPosition: true,
101
+ animationOptions: {
102
+ duration: 750,
103
+ easing: "linear"
104
+ },
105
+ filter: gridSettings["active_cat"],
106
+ layoutMode: layout,
107
+ originLeft: ltrMode,
108
+ masonry: {
109
+ columnWidth: columnWidth
110
+ },
111
+ sortBy: gridSettings["sort_by"]
 
 
 
 
112
  });
113
+ });
114
  if (loadMore) {
115
+ galleryElement.parent().find(".premium-gallery-load-more div").addClass(
116
+ "premium-gallery-item-hidden");
 
 
 
117
  if (galleryElement.find(".premium-gallery-item").length > minimum) {
118
+ galleryElement.parent().find(".premium-gallery-load-more").removeClass(
119
+ "premium-gallery-item-hidden");
120
+ galleryElement.find(".premium-gallery-item:gt(" + (minimum - 1) + ")").addClass(
121
+ "premium-gallery-item-hidden");
 
 
 
122
 
123
  function appendItems(imagesToShow) {
124
  var instance = galleryElement.data("isotope");
125
+ galleryElement.find(".premium-gallery-item-hidden").removeClass(
126
+ "premium-gallery-item-hidden");
127
+ galleryElement.parent().find(".premium-gallery-load-more").removeClass(
128
+ "premium-gallery-item-hidden");
129
+ var itemsToHide = instance.filteredItems.slice(imagesToShow, instance
130
+ .filteredItems.length).map(function (item) {
131
+ return item.element;
132
+ });
 
 
 
 
 
 
 
 
133
  $(itemsToHide).addClass("premium-gallery-item-hidden");
 
134
  galleryElement.isotope("layout");
 
135
  if (0 == itemsToHide) {
136
+ galleryElement.parent().find(".premium-gallery-load-more").addClass(
137
+ "premium-gallery-item-hidden");
 
 
138
  }
139
  }
140
+ galleryElement.parent().on("click", ".premium-gallery-load-more-btn", function () {
141
+ if (isFilterClicked) {
142
+ counter = minimum;
143
+ isFilterClicked = false;
144
+ }
145
+ else {
146
+ counter = counter;
147
+ }
148
+ counter = counter + imageToShow;
149
+ $.ajax({
150
+ url: appendItems(counter),
151
+ beforeSend: function () {
152
+ galleryElement.parent().find(
153
+ ".premium-gallery-load-more div").removeClass(
154
+ "premium-gallery-item-hidden");
155
+ },
156
+ success: function () {
157
+ galleryElement.parent().find(
158
+ ".premium-gallery-load-more div").addClass(
159
+ "premium-gallery-item-hidden");
160
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  });
162
+ });
163
  }
164
  }
165
+ if ( "yes" !== gridSettings["light_box"] ) {
166
+ galleryElement.find(".premium-gallery-video-wrap").each(function (index, item) {
167
+ var type = $(item).data("type");
168
+ $(item).closest(".premium-gallery-item").on("click", function () {
169
+ var $this = $(this);
170
+ $this.find(".pa-gallery-img").css("background", "#000");
171
+ $this.find(
172
+ "img, .pa-gallery-icons-caption-container, .pa-gallery-icons-wrapper, .premium-gallery-caption"
173
+ ).css("visibility", "hidden");
174
+ if ("hosted" !== type) {
175
+ var $iframeWrap = $this.find(".premium-gallery-iframe-wrap"),
176
+ src = $iframeWrap.data("src");
177
+
178
+ src = src.replace("&mute", "&autoplay=1&mute");
179
+
180
+ var $iframe = $("<iframe/>");
181
+
182
+ $iframe.attr("src", src);
183
+ $iframe.attr("frameborder", "0");
184
+ $iframe.attr("allowfullscreen", "1");
185
+ $iframe.attr("allow", "autoplay;encrypted-media;");
186
+ $iframeWrap.html( $iframe );
187
+ $iframe.css("visibility", "visible");
188
+ }
189
+ else {
190
+ var $video = $(item).find("video");
191
+ $video.get(0).play();
192
+ $video.css("visibility", "visible");
193
+ }
 
 
 
 
 
 
194
  });
195
+ });
196
  }
197
+ $scope.find(".premium-gallery-cats-container li a").click(function (e) {
 
198
  e.preventDefault();
 
199
  isFilterClicked = true;
 
200
  //Showing all images of category
201
+ $scope.find(".premium-gallery-cats-container li .active").removeClass("active");
 
 
 
202
  $(this).addClass("active");
 
203
  filter = $(this).attr("data-filter");
204
+ galleryElement.isotope({
205
+ filter: filter
206
+ });
207
  if (shuffle) {
208
  galleryElement.isotope("shuffle");
209
  }
 
210
  if (loadMore) appendItems(minimum);
 
211
  return false;
212
  });
 
213
  if ("default" === gridSettings["lightbox_type"]) {
214
+ $scope.find(".premium-img-gallery a[data-rel^='prettyPhoto']").prettyPhoto({
215
+ theme: gridSettings["theme"],
216
+ hook: "data-rel",
217
+ opacity: 0.7,
218
+ show_title: false,
219
+ deeplinking: false,
220
+ overlay_gallery: gridSettings["overlay"],
221
+ custom_markup: "",
222
+ default_width: 900,
223
+ default_height: 506,
224
+ social_tools: ""
225
+ });
 
 
226
  }
227
  };
 
228
  /****** Premium Counter Handler ******/
229
+ var PremiumCounterHandler = function ($scope, $) {
230
  var counterElement = $scope.find(".premium-counter");
231
+ elementorFrontend.waypoint(counterElement, function () {
232
  var counterSettings = counterElement.data(),
233
  incrementElement = counterElement.find(".premium-counter-init"),
234
  iconElement = counterElement.find(".icon");
235
  $(incrementElement).numerator(counterSettings);
236
+ $(iconElement).addClass("animated " + iconElement.data("animation"));
 
 
237
  });
238
  };
 
239
  /****** Premium Fancy Text Handler ******/
240
+ var PremiumFancyTextHandler = function ($scope, $) {
241
  var $elem = $scope.find(".premium-fancy-text-wrapper");
242
  var settings = $elem.data("settings");
243
+
244
  function escapeHtml(unsafe) {
245
+ return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
246
+ /"/g, "&quot;").replace(/'/g, "&#039;");
 
 
 
 
247
  }
248
+ if (settings["effect"] === "typing") {
249
  var fancyStrings = [];
250
+ settings["strings"].forEach(function (item) {
251
  fancyStrings.push(escapeHtml(item));
252
  });
253
  $elem.find(".premium-fancy-text").typed({
260
  cursorChar: settings["cursorChar"],
261
  loop: settings["loop"]
262
  });
263
+ }
264
+ else if (settings["effect"] === "slide") {
265
  $elem.find(".premium-fancy-text").vTicker({
266
  speed: settings["speed"],
267
  showItems: settings["showItems"],
269
  mousePause: settings["mousePause"],
270
  direction: "up"
271
  });
272
+ }
273
+ else {
274
  setFancyAnimation();
275
+
276
  function setFancyAnimation() {
277
+ var effect = settings.effect,
278
+ $item = $elem.find(".premium-fancy-list-items"),
 
279
  current = 0;
280
+ var delay = (settings.delay || 2.5) * 1000;
281
+ if ("bar" === effect) $elem.find(".premium-fancy-text-items-wrapper").addClass(
282
+ "active");
283
+ setInterval(function () {
284
+ // $elem.find( ".premium-fancy-text-items-wrapper" ).css("width", $item.eq( current ).outerWidth() );
285
+ if ("bar" === effect) $elem.find(".premium-fancy-text-items-wrapper")
286
+ .addClass("active");
287
+ $item.eq(current).addClass("premium-fancy-item-visible").removeClass(
288
+ "premium-fancy-item-hidden");
 
 
 
 
 
 
289
  var $inactiveItems = $item.filter(function (index) {
290
  return index !== current;
291
  });
292
+ $inactiveItems.addClass("premium-fancy-item-hidden").removeClass(
293
+ "premium-fancy-item-visible");
294
  current++;
295
+ if ($item.length === current) current = 0;
296
+ if ("bar" === effect) {
297
+ setTimeout(function () {
298
+ $elem.find(".premium-fancy-text-items-wrapper")
299
+ .removeClass("active");
300
+ }, delay - 100);
 
 
301
  }
302
+ }, delay);
 
 
303
  }
 
304
  }
305
  };
 
306
  /****** Premium Countdown Handler ******/
307
+ var PremiumCountDownHandler = function ($scope, $) {
308
+ var countDownElement = $scope.find(".premium-countdown").each(function () {
309
+ var countDownSettings = $(this).data("settings");
310
+ var label1 = countDownSettings["label1"],
311
+ label2 = countDownSettings["label2"],
312
+ newLabe1 = label1.split(","),
313
+ newLabe2 = label2.split(",");
314
+ if (countDownSettings["event"] === "onExpiry") {
315
+ $(this).find(".premium-countdown-init").pre_countdown({
316
+ labels: newLabe2,
317
+ labels1: newLabe1,
318
+ until: new Date(countDownSettings["until"]),
319
+ format: countDownSettings["format"],
320
+ padZeroes: true,
321
+ timeSeparator: countDownSettings["separator"],
322
+ onExpiry: function () {
323
+ $(this).html(countDownSettings["text"]);
324
+ },
325
+ serverSync: function () {
326
+ return new Date(countDownSettings["serverSync"]);
327
+ }
328
+ });
329
+ }
330
+ else if (countDownSettings["event"] === "expiryUrl") {
331
+ $(this).find(".premium-countdown-init").pre_countdown({
332
+ labels: newLabe2,
333
+ labels1: newLabe1,
334
+ until: new Date(countDownSettings["until"]),
335
+ format: countDownSettings["format"],
336
+ padZeroes: true,
337
+ timeSeparator: countDownSettings["separator"],
338
+ expiryUrl: countDownSettings["text"],
339
+ serverSync: function () {
340
+ return new Date(countDownSettings["serverSync"]);
341
+ }
342
+ });
343
+ }
344
+ times = $(this).find(".premium-countdown-init").pre_countdown("getTimes");
345
 
346
+ function runTimer(el) {
347
+ return el == 0;
348
+ }
349
+ if (times.every(runTimer)) {
350
  if (countDownSettings["event"] === "onExpiry") {
351
+ $(this).find(".premium-countdown-init").html(countDownSettings["text"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  }
353
+ if (countDownSettings["event"] === "expiryUrl") {
354
+ var editMode = $("body").find("#elementor").length;
355
+ if (editMode > 0) {
356
+ $(this).find(".premium-countdown-init").html(
357
+ "<h1>You can not redirect url from elementor Editor!!</h1>");
358
  }
359
+ else {
360
+ window.location.href = countDownSettings["text"];
 
 
 
 
 
 
 
 
 
361
  }
362
  }
363
+ }
364
+ });
365
  };
 
366
  /****** Premium Carousel Handler ******/
367
+ var PremiumCarouselHandler = function ($scope, $) {
368
  var carouselElement = $scope.find(".premium-carousel-wrapper"),
369
  carouselSettings = $(carouselElement).data("settings"),
370
  isEdit = elementorFrontend.isEditMode();
372
  function slideToShow(slick) {
373
  var slidesToShow = slick.options.slidesToShow,
374
  windowWidth = $(window).width();
 
375
  if (windowWidth > carouselSettings["tabletBreak"]) {
376
  slidesToShow = carouselSettings["slidesDesk"];
377
  }
 
378
  if (windowWidth <= carouselSettings["tabletBreak"]) {
379
  slidesToShow = carouselSettings["slidesTab"];
380
  }
 
381
  if (windowWidth <= carouselSettings["mobileBreak"]) {
382
  slidesToShow = carouselSettings["slidesMob"];
383
  }
 
384
  return slidesToShow;
385
  }
 
386
  if (isEdit) {
387
+ carouselElement.find(".item-wrapper").each(function (index, slide) {
388
+ var templateID = $(slide).data("template");
 
389
  if (undefined !== templateID) {
390
  $.ajax({
391
  type: "GET",
395
  action: "get_elementor_template_content",
396
  templateID: templateID
397
  }
398
+ }).success(function (response) {
399
  var data = JSON.parse(response).data;
 
400
  if (undefined !== data.template_content) {
401
  $(slide).html(data.template_content);
402
+ carouselElement.find(".premium-carousel-inner").slick(
403
+ "refresh");
 
 
404
  }
405
  });
406
  }
407
  });
408
  }
409
+ carouselElement.on("init", function (event) {
 
410
  event.preventDefault();
411
+ // restartAnimations();
412
+ $(this).find("item-wrapper.slick-active").each(function () {
413
+ var $this = $(this);
414
+ $this.addClass($this.data("animation"));
415
+ });
 
 
 
 
 
 
416
  $(".slick-track").addClass("translate");
417
  });
 
418
  carouselElement.find(".premium-carousel-inner").slick({
419
  vertical: carouselSettings["vertical"],
420
  slidesToScroll: carouselSettings["slidesToScroll"],
421
  slidesToShow: carouselSettings["slidesToShow"],
422
+ responsive: [{
 
423
  breakpoint: carouselSettings["tabletBreak"],
424
  settings: {
425
  slidesToShow: carouselSettings["slidesTab"],
451
  nextArrow: carouselSettings["nextArrow"],
452
  prevArrow: carouselSettings["prevArrow"],
453
  dots: carouselSettings["dots"],
454
+ customPaging: function () {
455
+ return ('<i class="' + carouselSettings["customPaging"] + '"></i>');
 
 
456
  }
457
  });
458
+
459
  function restartAnimations() {
460
+ var $slides = carouselElement.find(".premium-carousel-template");
461
+ $slides.find(".animated").each(function (index, elem) {
462
+ var settings = $(elem).data("settings");
463
+ if (!settings) return;
464
+ if (!settings._animation && !settings.animation) return;
 
 
 
 
 
 
 
465
  var animation = settings._animation || settings.animation;
466
+ $(elem).removeClass("animated " + animation).addClass("elementor-invisible");
 
467
  });
468
  };
469
+
470
  function triggerAnimation() {
471
+ carouselElement.find(".slick-active .elementor-invisible").each(function (index, elem) {
472
+ var settings = $(elem).data("settings");
473
+ if (!settings) return;
474
+ if (!settings._animation && !settings.animation) return;
475
+ var delay = settings._animation_delay ? settings._animation_delay : 0,
 
 
 
 
 
 
 
476
  animation = settings._animation || settings.animation;
477
+ setTimeout(function () {
478
+ $(elem).removeClass("elementor-invisible").addClass(animation +
479
+ ' animated');
480
+ }, delay);
 
481
  });
 
482
  }
483
+ carouselElement.on("afterChange", function (event, slick, currentSlide) {
 
484
  var slidesScrolled = slick.options.slidesToScroll,
485
  slidesToShow = slideToShow(slick),
486
  centerMode = slick.options.centerMode,
487
  slideToAnimate = currentSlide + slidesToShow - 1;
 
 
488
  restartAnimations();
 
489
  triggerAnimation();
 
490
  if (slidesScrolled === 1) {
491
+ if (!centerMode === true) {
492
+ var $inViewPort = $(this).find("[data-slick-index='" + slideToAnimate +
493
+ "']");
 
 
494
  if ("null" != carouselSettings["animation"]) {
495
+ $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
496
+ .addClass(carouselSettings["animation"]).removeClass(
497
+ "premium-carousel-content-hidden");
498
  }
499
  }
500
+ }
501
+ else {
502
  for (var i = slidesScrolled + currentSlide; i >= 0; i--) {
503
+ $inViewPort = $(this).find("[data-slick-index='" + i + "']");
504
+ if ("null" != carouselSettings["animation"]) {
505
+ $inViewPort.find("p, h1, h2, h3, h4, h5, h6, span, a, img, i, button")
506
+ .addClass(carouselSettings["animation"]).removeClass(
507
+ "premium-carousel-content-hidden");
 
 
 
 
508
  }
509
  }
510
  }
511
  });
512
+ carouselElement.on("beforeChange", function (event, slick, currentSlide) {
513
+ var $inViewPort = $(this).find("[data-slick-index='" + currentSlide + "']");
 
 
 
 
 
 
 
 
514
  if ("null" != carouselSettings["animation"]) {
515
+ $inViewPort.siblings().find(
516
+ "p, h1, h2, h3, h4, h5, h6, span, a, img, i, button").removeClass(
517
+ carouselSettings["animation"]).addClass(
518
+ "premium-carousel-content-hidden");
 
519
  }
520
  });
 
521
  if (carouselSettings["vertical"]) {
522
  var maxHeight = -1;
523
+ carouselElement.find(".slick-slide").each(function () {
 
524
  if ($(this).height() > maxHeight) {
525
  maxHeight = $(this).height();
526
  }
527
  });
528
+ carouselElement.find(".slick-slide").each(function () {
 
529
  if ($(this).height() < maxHeight) {
530
+ $(this).css("margin", Math.ceil(
531
+ (maxHeight - $(this).height()) / 2) + "px 0");
 
 
532
  }
533
  });
534
  }
 
535
  var marginFix = {
536
  element: $("a.ver-carousel-arrow"),
537
+ getWidth: function () {
538
  var width = this.element.outerWidth();
 
539
  return width / 2;
540
  },
541
+ setWidth: function (type) {
542
  type = type || "vertical";
 
543
  if (type == "vertical") {
544
+ this.element.css("margin-left", "-" + this.getWidth() + "px");
545
+ }
546
+ else {
547
+ this.element.css("margin-top", "-" + this.getWidth() + "px");
 
 
 
 
 
548
  }
549
  }
550
  };
 
551
  marginFix.setWidth();
552
  marginFix.element = $("a.carousel-arrow");
553
  marginFix.setWidth("horizontal");
554
  };
 
555
  /****** Premium Banner Handler ******/
556
+ var PremiumBannerHandler = function ($scope, $) {
557
  var bannerElement = $scope.find(".premium-banner");
558
+ bannerElement.find(".premium-banner-ib").hover(function () {
559
+ $(this).find(".premium-banner-ib-img").addClass("active");
560
+ }, function () {
561
+ $(this).find(".premium-banner-ib-img").removeClass("active");
562
+ });
 
 
 
 
 
 
 
563
  };
 
564
  /****** Premium Modal Box Handler ******/
565
+ var PremiumModalBoxHandler = function ($scope, $) {
566
  var modalBoxElement = $scope.find(".premium-modal-box-container"),
567
  modalBoxSettings = modalBoxElement.data("settings");
 
568
  if (modalBoxElement.length > 0) {
569
  if (modalBoxSettings["trigger"] === "pageload") {
570
+ $(document).ready(function ($) {
571
+ setTimeout(function () {
572
+ modalBoxElement.find(".premium-modal-box-modal").modal();
 
 
573
  }, modalBoxSettings["delay"] * 1000);
574
  });
575
  }
576
  }
577
  };
 
578
  /****** Premium Blog Handler ******/
579
+ var PremiumBlogHandler = function ($scope, $) {
580
+ var $blogElement = $scope.find(".premium-blog-wrap"),
581
+ $blogPost = $blogElement.find(".premium-blog-post-outer-container"),
582
+ colsNumber = $blogElement.data("col"),
583
+ carousel = $blogElement.data("carousel"),
584
+ grid = $blogElement.data("grid");
 
 
585
  var $metaSeparators = $blogPost.first().find(".premium-blog-meta-separator");
586
+ if (1 === $metaSeparators.length) {
 
587
  $blogPost.find(".premium-blog-meta-separator").remove();
588
+ }
589
+ else {
590
+ if (!$blogPost.find(".fa-user").length) {
591
+ $blogPost.each(function (index, post) {
592
+ $(post).find(".premium-blog-meta-separator").first().remove();
593
  });
594
  }
595
  }
596
+ $scope.find(".premium-blog-cats-container li a").click(function (e) {
 
597
  e.preventDefault();
598
+ $scope.find(".premium-blog-cats-container li .active").removeClass("active");
 
 
 
 
599
  $(this).addClass("active");
600
+ var selector = $(this).attr("data-filter");
601
+ $blogElement.isotope({
602
+ filter: selector
603
+ });
 
604
  return false;
605
  });
 
606
  var masonryBlog = $blogElement.hasClass("premium-blog-masonry");
 
607
  if (masonryBlog && !carousel) {
608
+ $blogElement.imagesLoaded(function () {
609
  $blogElement.isotope({
610
  itemSelector: ".premium-blog-post-outer-container",
611
  percentPosition: true,
617
  });
618
  });
619
  }
 
620
  if (carousel && grid) {
621
  var autoPlay = $blogElement.data("play"),
622
  speed = $blogElement.data("speed"),
625
  dots = $blogElement.data("dots"),
626
  prevArrow = null,
627
  nextArrow = null;
 
628
  if (arrows) {
629
  (prevArrow =
630
+ '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>'
631
+ ), (nextArrow =
632
+ '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>'
633
+ );
634
+ }
635
+ else {
636
  prevArrow = prevArrow = "";
637
  }
 
638
  $($blogElement).slick({
639
  infinite: true,
640
  slidesToShow: colsNumber,
641
  slidesToScroll: colsNumber,
642
+ responsive: [{
 
643
  breakpoint: 769,
644
  settings: {
645
  slidesToShow: 1,
661
  fade: fade,
662
  draggable: true,
663
  dots: dots,
664
+ customPaging: function () {
665
  return '<i class="fas fa-circle"></i>';
666
  }
667
  });
668
  }
669
  };
 
670
  /****** Premium Image Scroll ******/
671
+ var PremiumImageScrollHandler = function ($scope, $) {
672
  var scrollElement = $scope.find(".premium-image-scroll-container"),
673
  scrollOverlay = scrollElement.find(".premium-image-scroll-overlay"),
674
+ scrollVertical = scrollElement.find(".premium-image-scroll-vertical"),
 
 
675
  dataElement = scrollElement.data("settings"),
676
  imageScroll = scrollElement.find("img"),
677
  direction = dataElement["direction"],
679
  transformOffset = null;
680
 
681
  function startTransform() {
682
+ imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "( -" +
683
+ transformOffset + "px)");
 
 
 
 
 
684
  }
685
 
686
  function endTransform() {
687
+ imageScroll.css("transform", (direction === "vertical" ? "translateY" : "translateX") + "(0px)");
 
 
 
 
688
  }
689
 
690
  function setTransform() {
691
  if (direction === "vertical") {
692
  transformOffset = imageScroll.height() - scrollElement.height();
693
+ }
694
+ else {
695
  transformOffset = imageScroll.width() - scrollElement.width();
696
  }
697
  }
 
698
  if (dataElement["trigger"] === "scroll") {
699
  scrollElement.addClass("premium-container-scroll");
700
  if (direction === "vertical") {
701
  scrollVertical.addClass("premium-image-scroll-ver");
702
+ }
703
+ else {
704
+ scrollElement.imagesLoaded(function () {
705
  scrollOverlay.css({
706
  width: imageScroll.width(),
707
  height: imageScroll.height()
708
  });
709
  });
710
  }
711
+ }
712
+ else {
713
  if (reverse === "yes") {
714
+ scrollElement.imagesLoaded(function () {
715
  scrollElement.addClass("premium-container-scroll-instant");
716
  setTransform();
717
  startTransform();
720
  if (direction === "vertical") {
721
  scrollVertical.removeClass("premium-image-scroll-ver");
722
  }
723
+ scrollElement.mouseenter(function () {
724
  scrollElement.removeClass("premium-container-scroll-instant");
725
  setTransform();
726
  reverse === "yes" ? endTransform() : startTransform();
727
  });
728
+ scrollElement.mouseleave(function () {
 
729
  reverse === "yes" ? startTransform() : endTransform();
730
  });
731
  }
732
  };
733
+ var PremiumContactFormHandler = function ($scope, $) {
 
734
  var contactForm = $scope.find(".premium-cf7-container");
 
735
  var input = contactForm.find(
736
  'input[type="text"], input[type="email"], textarea, input[type="password"], input[type="date"], input[type="number"], input[type="tel"], input[type="file"], input[type="url"]'
737
  );
738
  input.wrap("<span class='wpcf7-span'>");
739
+ input.on("focus blur", function () {
740
+ $(this).closest(".wpcf7-span").toggleClass("is-focused");
 
 
 
741
  });
742
  };
743
+ var PremiumPersonsHandler = function ($scope, $) {
 
 
744
  var $persons = $scope.find(".multiple-persons");
745
+ if (!$persons.length) return;
 
 
 
746
  var carousel = $persons.data("carousel");
747
+ if (carousel) {
748
+ var autoPlay = $persons.data("play"),
749
+ speed = $persons.data("speed"),
750
+ rtl = $persons.data("rtl"),
751
+ colsNumber = $persons.data("col"),
752
+ prevArrow =
753
+ '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fas fa-angle-left" aria-hidden="true"></i></a>',
754
+ nextArrow =
755
+ '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fas fa-angle-right" aria-hidden="true"></i></a>';
 
756
  $persons.slick({
757
  infinite: true,
758
  slidesToShow: colsNumber,
759
  slidesToScroll: colsNumber,
760
+ responsive: [{
761
+ breakpoint: 769,
762
+ settings: {
763
+ slidesToShow: 1,
764
+ slidesToScroll: 1
765
+ }
766
+ },
767
+ {
768
+ breakpoint: 481,
769
+ settings: {
770
+ slidesToShow: 1,
771
+ slidesToScroll: 1
772
+ }
773
+ }
774
  ],
775
  autoplay: autoPlay,
776
  autoplaySpeed: speed,
781
  pauseOnHover: true
782
  });
783
  }
784
+ if (!$scope.hasClass("premium-person-widget-style2")) return;
785
+ if ("yes" !== $persons.data("persons-equal")) return;
 
 
 
 
 
 
786
  var heights = new Array();
787
+ $persons.find(".premium-person-style2").each(function (index, person) {
788
+ $(person).imagesLoaded(function () {}).done(function () {
789
+ var imageHeight = $(person).find(".premium-person-image-container")
790
+ .outerHeight();
791
+ heights.push(imageHeight);
792
+ });
793
  });
794
+ $persons.imagesLoaded(function () {}).done(function () {
795
+ var maxHeight = Math.max.apply(null, heights);
796
+ $persons.find(".premium-person-image-wrap").css("height", maxHeight + "px");
 
 
 
 
797
  });
 
 
 
 
798
  };
 
 
799
  //Elementor JS Hooks
800
+ $(window).on("elementor/frontend/init", function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
801
  elementorFrontend.hooks.addAction(
802
+ "frontend/element_ready/premium-addon-video-box.default", PremiumVideoBoxWidgetHandler);
803
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-img-gallery.default", PremiumGridWidgetHandler);
 
804
  elementorFrontend.hooks.addAction(
805
+ "frontend/element_ready/premium-addon-fancy-text.default", PremiumFancyTextHandler
 
806
  );
807
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-counter.default", PremiumCounterHandler);
808
  elementorFrontend.hooks.addAction(
809
+ "frontend/element_ready/premium-countdown-timer.default", PremiumCountDownHandler);
 
 
810
  elementorFrontend.hooks.addAction(
811
+ "frontend/element_ready/premium-carousel-widget.default", PremiumCarouselHandler);
812
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-banner.default", PremiumBannerHandler);
 
 
813
  elementorFrontend.hooks.addAction(
814
+ "frontend/element_ready/premium-addon-modal-box.default", PremiumModalBoxHandler);
815
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-blog.default", PremiumBlogHandler);
816
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-image-scroll.default", PremiumImageScrollHandler);
817
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-contact-form.default", PremiumContactFormHandler);
818
+ elementorFrontend.hooks.addAction("frontend/element_ready/premium-addon-person.default", PremiumPersonsHandler);
819
  if (elementorFrontend.isEditMode()) {
820
  elementorFrontend.hooks.addAction(
821
+ "frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarWidgetHandler);
822
+ }
823
+ else {
 
824
  elementorFrontend.hooks.addAction(
825
+ "frontend/element_ready/premium-addon-progressbar.default", PremiumProgressBarScrollWidgetHandler);
 
 
826
  }
827
  });
828
+ })(jQuery);
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 3.10.9
7
  Author: Leap13
8
  Author URI: https://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -14,12 +14,12 @@ License: GNU General Public License v3.0
14
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
 
16
  // Define Constants
17
- define('PREMIUM_ADDONS_VERSION', '3.10.9');
18
  define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
  define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
  define('PREMIUM_ADDONS_FILE', __FILE__);
21
  define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
- define('PREMIUM_ADDONS_STABLE_VERSION', '3.10.8');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 3.11.0
7
  Author: Leap13
8
  Author URI: https://leap13.com/
9
  Text Domain: premium-addons-for-elementor
14
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
 
16
  // Define Constants
17
+ define('PREMIUM_ADDONS_VERSION', '3.11.0');
18
  define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
  define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
  define('PREMIUM_ADDONS_FILE', __FILE__);
21
  define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
+ define('PREMIUM_ADDONS_STABLE_VERSION', '3.10.9');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: Leap13, Rimoun
3
  Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, Page Builder, Widgets, Elementor Widgets
4
  Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme
5
  Requires at Least: 4.5
6
- Tested Up To: 5.3
7
  Requires PHP: 5.4
8
- Stable Tag: 3.10.9
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -175,6 +175,16 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
 
 
178
  = 3.10.9 =
179
 
180
  - Fixed: `Notice: Trying to access array offset on value of type bool in ./premium-addons-for-elementor/admin/settings/modules-setting.php on line 106`
3
  Tags: Elementor, Elementor Page Builder, Elements, Elementor Addons, Add-ons, Page Builder, Widgets, Elementor Widgets
4
  Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme
5
  Requires at Least: 4.5
6
+ Tested Up To: 5.3.2
7
  Requires PHP: 5.4
8
+ Stable Tag: 3.11.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
175
 
176
  == Changelog ==
177
 
178
+ = 3.11.0 =
179
+
180
+ - Tweak: Added `Filter Rules (Match/Exclude)` options for Authors, Categories and Tags in Blog widget.
181
+ - Tweak: Added `Enable Pagination Next/Prev Strings` option in Blog widget.
182
+ - Tweak: Added `Background Color` option for active page in Blog widget.
183
+ - Tweak: Pagination number styling improved for better pagination experience in Blog widget.
184
+ - Tweak: Added `Image Size` option in Banner widget.
185
+ - Tweak: Videos in Media Grid widget are now loaded only when an image is clicked to optimize page loading speed and size.
186
+ - Fixed: Background Color not applied on Triangle Ribbon in Pricing Table widget.
187
+
188
  = 3.10.9 =
189
 
190
  - Fixed: `Notice: Trying to access array offset on value of type bool in ./premium-addons-for-elementor/admin/settings/modules-setting.php on line 106`
widgets/dep/queries.php CHANGED
@@ -13,9 +13,9 @@ function premium_blog_get_post_data( $args, $paged, $new_offset ) {
13
  'offset' => $new_offset,
14
  );
15
 
16
- $atts = wp_parse_args( $args, $defaults );
17
 
18
- $posts = get_posts( $atts );
19
 
20
  return $posts;
21
  }
@@ -24,15 +24,22 @@ function premium_blog_get_post_settings( $settings ) {
24
 
25
  $authors = $settings['premium_blog_users'];
26
 
 
 
 
 
 
 
27
  if( ! empty( $authors ) ) {
28
- $post_args['author'] = implode(',', $authors);
 
29
  }
30
 
31
- $post_args['category'] = $settings['premium_blog_categories'];
32
 
33
- $post_args['tag__in'] = $settings['premium_blog_tags'];
34
 
35
- $post_args['post__not_in'] = $settings['premium_blog_posts_exclude'];
36
 
37
  $post_args['order'] = $settings['premium_blog_order'];
38
 
@@ -43,7 +50,7 @@ function premium_blog_get_post_settings( $settings ) {
43
  return $post_args;
44
  }
45
 
46
- function premium_addons_get_excerpt_by_id( $post_id, $excerpt_length, $excerpt_type, $exceprt_text, $excerpt_src ) {
47
 
48
  $the_post = get_post( $post_id );
49
 
@@ -72,7 +79,7 @@ function premium_addons_get_excerpt_by_id( $post_id, $excerpt_length, $excerpt_t
72
 
73
  }
74
 
75
- function premium_addons_post_type_categories() {
76
  $terms = get_terms(
77
  array(
78
  'taxonomy' => 'category',
@@ -91,7 +98,7 @@ function premium_addons_post_type_categories() {
91
  return $options;
92
  }
93
 
94
- function premium_addons_post_type_users() {
95
  $users = get_users();
96
 
97
  $options = array();
@@ -107,7 +114,7 @@ function premium_addons_post_type_users() {
107
  return $options;
108
  }
109
 
110
- function premium_addons_post_type_tags() {
111
  $tags = get_tags();
112
 
113
  $options = array();
@@ -120,7 +127,9 @@ function premium_addons_post_type_tags() {
120
 
121
  return $options;
122
  }
123
- function premium_addons_posts_list() {
 
 
124
  $list = get_posts( array(
125
  'post_type' => 'post',
126
  'posts_per_page' => -1,
13
  'offset' => $new_offset,
14
  );
15
 
16
+ $query_args = wp_parse_args( $args, $defaults );
17
 
18
+ $posts = get_posts( $query_args );
19
 
20
  return $posts;
21
  }
24
 
25
  $authors = $settings['premium_blog_users'];
26
 
27
+ $category_rule = $settings['category_filter_rule'];
28
+
29
+ $tag_rule = $settings['tags_filter_rule'];
30
+
31
+ $post_rule = $settings['posts_filter_rule'];
32
+
33
  if( ! empty( $authors ) ) {
34
+ $author_rule = $settings['author_filter_rule'];
35
+ $post_args[ $author_rule ] = implode( ',', $authors );
36
  }
37
 
38
+ $post_args[ $category_rule ] = $settings['premium_blog_categories'];
39
 
40
+ $post_args[ $tag_rule ] = $settings['premium_blog_tags'];
41
 
42
+ $post_args[ $post_rule ] = $settings['premium_blog_posts_exclude'];
43
 
44
  $post_args['order'] = $settings['premium_blog_order'];
45
 
50
  return $post_args;
51
  }
52
 
53
+ function premium_blog_get_excerpt_by_id( $post_id, $excerpt_length, $excerpt_type, $exceprt_text, $excerpt_src ) {
54
 
55
  $the_post = get_post( $post_id );
56
 
79
 
80
  }
81
 
82
+ function premium_blog_post_type_categories() {
83
  $terms = get_terms(
84
  array(
85
  'taxonomy' => 'category',
98
  return $options;
99
  }
100
 
101
+ function premium_blog_post_type_users() {
102
  $users = get_users();
103
 
104
  $options = array();
114
  return $options;
115
  }
116
 
117
+ function premium_blog_post_type_tags() {
118
  $tags = get_tags();
119
 
120
  $options = array();
127
 
128
  return $options;
129
  }
130
+
131
+ function premium_blog_posts_list() {
132
+
133
  $list = get_posts( array(
134
  'post_type' => 'post',
135
  'posts_per_page' => -1,
widgets/premium-banner.php CHANGED
@@ -11,6 +11,7 @@ use Elementor\Controls_Manager;
11
  use Elementor\Scheme_Color;
12
  use Elementor\Scheme_Typography;
13
  use Elementor\Group_Control_Border;
 
14
  use Elementor\Group_Control_Typography;
15
  use Elementor\Group_Control_Css_Filter;
16
  use Elementor\Group_Control_Box_Shadow;
@@ -79,6 +80,15 @@ class Premium_Banner extends Widget_Base {
79
  ]
80
  );
81
 
 
 
 
 
 
 
 
 
 
82
  $this->add_control('premium_banner_link_url_switch',
83
  [
84
  'label' => __('Link', 'premium-addons-for-elementor'),
@@ -910,7 +920,16 @@ class Premium_Banner extends Widget_Base {
910
 
911
  $banner_url = 'url' == $settings['premium_banner_link_selection'] ? $settings['premium_banner_link']['url'] : get_permalink($settings['premium_banner_existing_link']);
912
 
913
- $alt = esc_attr( Control_Media::get_image_alt( $settings['premium_banner_image'] ) );
 
 
 
 
 
 
 
 
 
914
 
915
  ?>
916
  <div class="premium-banner" id="premium-banner-<?php echo esc_attr($this->get_id()); ?>">
@@ -918,20 +937,20 @@ class Premium_Banner extends Widget_Base {
918
  <?php if( !empty( $settings['premium_banner_image']['url'] ) ) : ?>
919
  <?php if( $settings['premium_banner_height'] == 'custom' ) : ?>
920
  <div class="premium-banner-img-wrap">
921
- <?php endif; ?>
922
- <img class="premium-banner-ib-img" alt="<?php echo $alt; ?>" src="<?php echo $settings['premium_banner_image']['url']; ?>">
923
- <?php if( $settings['premium_banner_height'] == 'custom' ): ?>
924
  </div>
925
- <?php endif; ?>
926
- <?php endif; ?>
927
  <div class="premium-banner-ib-desc">
928
- <?php echo $full_title; ?>
929
- <?php if( ! empty( $settings['premium_banner_description'] ) ) : ?>
930
  <div class="premium-banner-ib-content premium_banner_content">
931
  <div <?php echo $this->get_render_attribute_string('premium_banner_description'); ?>><?php echo $settings[ 'premium_banner_description' ]; ?></div>
932
  </div>
933
- <?php endif; ?>
934
- <?php if( 'yes' == $settings['premium_banner_link_switcher'] && !empty( $settings['premium_banner_more_text'] ) ) : ?>
935
 
936
  <div class ="premium-banner-read-more">
937
  <a class = "premium-banner-link" <?php if( !empty( $banner_url ) ) : ?> href="<?php echo esc_url( $banner_url ); ?>"<?php endif;?><?php if( !empty( $settings['premium_banner_link']['is_external'] ) ) : ?> target="_blank" <?php endif; ?><?php if( !empty($settings['premium_banner_link']['nofollow'] ) ) : ?> rel="nofollow" <?php endif; ?>><?php echo esc_html( $settings['premium_banner_more_text'] ); ?></a>
@@ -999,6 +1018,22 @@ class Premium_Banner extends Widget_Base {
999
 
1000
  var minSize = settings.premium_banner_min_range + 'px',
1001
  maxSize = settings.premium_banner_max_range + 'px';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1002
  #>
1003
 
1004
  <div {{{ view.getRenderAttributeString( 'banner' ) }}}>
@@ -1007,7 +1042,7 @@ class Premium_Banner extends Widget_Base {
1007
  <# if( 'custom' === settings.premium_banner_height ) { #>
1008
  <div class="premium-banner-img-wrap">
1009
  <# } #>
1010
- <img class="premium-banner-ib-img" src="{{ settings.premium_banner_image.url }}">
1011
  <# if( 'custom' === settings.premium_banner_height ) { #>
1012
  </div>
1013
  <# } #>
11
  use Elementor\Scheme_Color;
12
  use Elementor\Scheme_Typography;
13
  use Elementor\Group_Control_Border;
14
+ use Elementor\Group_Control_Image_Size;
15
  use Elementor\Group_Control_Typography;
16
  use Elementor\Group_Control_Css_Filter;
17
  use Elementor\Group_Control_Box_Shadow;
80
  ]
81
  );
82
 
83
+ $this->add_group_control(
84
+ Group_Control_Image_Size::get_type(),
85
+ [
86
+ 'name' => 'thumbnail',
87
+ 'default' => 'full',
88
+ 'separator' => 'none',
89
+ ]
90
+ );
91
+
92
  $this->add_control('premium_banner_link_url_switch',
93
  [
94
  'label' => __('Link', 'premium-addons-for-elementor'),
920
 
921
  $banner_url = 'url' == $settings['premium_banner_link_selection'] ? $settings['premium_banner_link']['url'] : get_permalink($settings['premium_banner_existing_link']);
922
 
923
+ $image_html = '';
924
+ if ( ! empty( $settings['premium_banner_image']['url'] ) ) {
925
+
926
+ $this->add_render_attribute( 'image', 'src', $settings['premium_banner_image']['url'] );
927
+ $this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $settings['premium_banner_image'] ) );
928
+ $this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $settings['premium_banner_image'] ) );
929
+
930
+ $image_html = Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'premium_banner_image' );
931
+
932
+ }
933
 
934
  ?>
935
  <div class="premium-banner" id="premium-banner-<?php echo esc_attr($this->get_id()); ?>">
937
  <?php if( !empty( $settings['premium_banner_image']['url'] ) ) : ?>
938
  <?php if( $settings['premium_banner_height'] == 'custom' ) : ?>
939
  <div class="premium-banner-img-wrap">
940
+ <?php endif;
941
+ echo $image_html;
942
+ if( $settings['premium_banner_height'] == 'custom' ): ?>
943
  </div>
944
+ <?php endif;
945
+ endif; ?>
946
  <div class="premium-banner-ib-desc">
947
+ <?php echo $full_title;
948
+ if( ! empty( $settings['premium_banner_description'] ) ) : ?>
949
  <div class="premium-banner-ib-content premium_banner_content">
950
  <div <?php echo $this->get_render_attribute_string('premium_banner_description'); ?>><?php echo $settings[ 'premium_banner_description' ]; ?></div>
951
  </div>
952
+ <?php endif;
953
+ if( 'yes' == $settings['premium_banner_link_switcher'] && !empty( $settings['premium_banner_more_text'] ) ) : ?>
954
 
955
  <div class ="premium-banner-read-more">
956
  <a class = "premium-banner-link" <?php if( !empty( $banner_url ) ) : ?> href="<?php echo esc_url( $banner_url ); ?>"<?php endif;?><?php if( !empty( $settings['premium_banner_link']['is_external'] ) ) : ?> target="_blank" <?php endif; ?><?php if( !empty($settings['premium_banner_link']['nofollow'] ) ) : ?> rel="nofollow" <?php endif; ?>><?php echo esc_html( $settings['premium_banner_more_text'] ); ?></a>
1018
 
1019
  var minSize = settings.premium_banner_min_range + 'px',
1020
  maxSize = settings.premium_banner_max_range + 'px';
1021
+
1022
+ var imageHtml = '';
1023
+ if ( settings.premium_banner_image.url ) {
1024
+ var image = {
1025
+ id: settings.premium_banner_image.id,
1026
+ url: settings.premium_banner_image.url,
1027
+ size: settings.thumbnail_size,
1028
+ dimension: settings.thumbnail_custom_dimension,
1029
+ model: view.getEditModel()
1030
+ };
1031
+
1032
+ var image_url = elementor.imagesManager.getImageUrl( image );
1033
+
1034
+ imageHtml = '<img src="' + image_url + '"/>';
1035
+
1036
+ }
1037
  #>
1038
 
1039
  <div {{{ view.getRenderAttributeString( 'banner' ) }}}>
1042
  <# if( 'custom' === settings.premium_banner_height ) { #>
1043
  <div class="premium-banner-img-wrap">
1044
  <# } #>
1045
+ {{{imageHtml}}}
1046
  <# if( 'custom' === settings.premium_banner_height ) { #>
1047
  </div>
1048
  <# } #>
widgets/premium-blog.php CHANGED
@@ -101,6 +101,156 @@ class Premium_Blog extends Widget_Base {
101
 
102
  $this->end_controls_section();
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  $this->start_controls_section('premium_blog_content_settings',
105
  [
106
  'label' => __('Display Options', 'premium-addons-for-elementor'),
@@ -447,49 +597,6 @@ class Premium_Blog extends Widget_Base {
447
  ]
448
  );
449
 
450
- $this->add_control('premium_blog_number_of_posts',
451
- [
452
- 'label' => __('Posts Per Page', 'premium-addons-for-elementor'),
453
- 'description' => __('Choose how many posts do you want to be displayed per page','premium-addons-for-elementor'),
454
- 'type' => Controls_Manager::NUMBER,
455
- 'min' => 1,
456
- 'default' => 3,
457
- ]
458
- );
459
-
460
- $this->add_control('premium_blog_total_posts_number',
461
- [
462
- 'label' => __('Total Number of Posts', 'premium-addons-for-elementor'),
463
- 'type' => Controls_Manager::NUMBER,
464
- 'default' => wp_count_posts()->publish,
465
- 'min' => 1,
466
- 'condition' => [
467
- 'premium_blog_paging' => 'yes',
468
- ]
469
- ]
470
- );
471
-
472
- $this->add_control('premium_blog_offset',
473
- [
474
- 'label' => __( 'Offset Count', 'premium-addons-for-elementor' ),
475
- 'description' => __('The index of post to start with','premium-addons-for-elementor'),
476
- 'type' => Controls_Manager::NUMBER,
477
- 'default' => '0',
478
- 'min' => '0',
479
- ]
480
- );
481
-
482
- $this->add_control('premium_blog_categories',
483
- [
484
- 'label' => __( 'Filter By Category', 'premium-addons-for-elementor' ),
485
- 'type' => Controls_Manager::SELECT2,
486
- 'description' => __('Get posts for specific category(s)','premium-addons-for-elementor'),
487
- 'label_block' => true,
488
- 'multiple' => true,
489
- 'options' => premium_addons_post_type_categories(),
490
- ]
491
- );
492
-
493
  $this->add_control('premium_blog_cat_tabs',
494
  [
495
  'label' => __('Filter Tabs', 'premium-addons-for-elementor'),
@@ -541,72 +648,6 @@ class Premium_Blog extends Widget_Base {
541
  ]
542
  );
543
 
544
- $this->add_control('premium_blog_tags',
545
- [
546
- 'label' => __( 'Filter By Tag', 'premium-addons-for-elementor' ),
547
- 'type' => Controls_Manager::SELECT2,
548
- 'description' => __('Get posts for specific tag(s)','premium-addons-for-elementor'),
549
- 'label_block' => true,
550
- 'multiple' => true,
551
- 'options' => premium_addons_post_type_tags(),
552
- ]
553
- );
554
-
555
- $this->add_control('premium_blog_users',
556
- [
557
- 'label' => __( 'Filter By Author', 'premium-addons-for-elementor' ),
558
- 'type' => Controls_Manager::SELECT2,
559
- 'description' => __('Get posts for specific author(s)','premium-addons-for-elementor'),
560
- 'label_block' => true,
561
- 'multiple' => true,
562
- 'options' => premium_addons_post_type_users(),
563
- ]
564
- );
565
-
566
- $this->add_control('premium_blog_posts_exclude',
567
- [
568
- 'label' => __( 'Posts to Exclude', 'premium-addons-for-elementor' ),
569
- 'type' => Controls_Manager::SELECT2,
570
- 'description' => __('Add post(s) to exclude','premium-addons-for-elementor'),
571
- 'label_block' => true,
572
- 'multiple' => true,
573
- 'options' => premium_addons_posts_list(),
574
- ]
575
- );
576
-
577
- $this->add_control('premium_blog_order_by',
578
- [
579
- 'label' => __( 'Order By', 'premium-addons-for-elementor' ),
580
- 'type' => Controls_Manager::SELECT,
581
- 'label_block' => true,
582
- 'options' => [
583
- 'none' => __('None', 'premium-addons-for-elementor'),
584
- 'ID' => __('ID', 'premium-addons-for-elementor'),
585
- 'author'=> __('Author', 'premium-addons-for-elementor'),
586
- 'title' => __('Title', 'premium-addons-for-elementor'),
587
- 'name' => __('Name', 'premium-addons-for-elementor'),
588
- 'date' => __('Date', 'premium-addons-for-elementor'),
589
- 'modified'=> __('Last Modified', 'premium-addons-for-elementor'),
590
- 'rand' => __('Random', 'premium-addons-for-elementor'),
591
- 'comment_count'=> __('Number of Comments', 'premium-addons-for-elementor'),
592
- ],
593
- 'default' => 'date'
594
- ]
595
- );
596
-
597
- $this->add_control('premium_blog_order',
598
- [
599
- 'label' => __( 'Order', 'premium-addons-for-elementor' ),
600
- 'type' => Controls_Manager::SELECT,
601
- 'label_block' => true,
602
- 'options' => [
603
- 'DESC' => __('Descending', 'premium-addons-for-elementor'),
604
- 'ASC' => __('Ascending', 'premium-addons-for-elementor'),
605
- ],
606
- 'default' => 'DESC'
607
- ]
608
- );
609
-
610
  $this->add_control('premium_blog_new_tab',
611
  [
612
  'label' => __('Links in New Tab', 'premium-addons-for-elementor'),
@@ -731,16 +772,38 @@ class Premium_Blog extends Widget_Base {
731
  ]
732
  );
733
 
734
- $this->add_control('premium_blog_next_text',
735
- [
736
- 'label' => __( 'Next Page String', 'premium-addons-for-elementor' ),
737
- 'type' => Controls_Manager::TEXT,
738
- 'default' => __('Next','premium-addons-for-elementor'),
 
 
 
 
 
 
 
 
 
 
 
739
  'condition' => [
740
  'premium_blog_paging' => 'yes',
741
  ]
742
- ]
743
- );
 
 
 
 
 
 
 
 
 
 
 
744
 
745
  $this->add_control('premium_blog_prev_text',
746
  [
@@ -748,7 +811,20 @@ class Premium_Blog extends Widget_Base {
748
  'type' => Controls_Manager::TEXT,
749
  'default' => __('Previous','premium-addons-for-elementor'),
750
  'condition' => [
751
- 'premium_blog_paging' => 'yes',
 
 
 
 
 
 
 
 
 
 
 
 
 
752
  ]
753
  ]
754
  );
@@ -771,13 +847,18 @@ class Premium_Blog extends Widget_Base {
771
  'icon' => 'fa fa-align-right',
772
  ],
773
  ],
 
 
 
 
 
774
  'default' => 'right',
775
  'condition' => [
776
  'premium_blog_paging' => 'yes',
777
  ],
778
  'selectors' => [
779
- '{{WRAPPER}} .premium-blog-pagination-container' => 'text-align: {{VALUE}};',
780
- ],
781
  ]
782
  );
783
 
@@ -1219,7 +1300,7 @@ class Premium_Blog extends Widget_Base {
1219
 
1220
  $this->start_controls_section('premium_blog_pagination_Style',
1221
  [
1222
- 'label' => __('Pagination Style', 'premium-addons-for-elementor'),
1223
  'tab' => Controls_Manager::TAB_STYLE,
1224
  'condition' => [
1225
  'premium_blog_paging' => 'yes',
@@ -1231,9 +1312,9 @@ class Premium_Blog extends Widget_Base {
1231
  Group_Control_Typography::get_type(),
1232
  [
1233
  'name' => 'premium_blog_pagination_typo',
1234
- 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li *',
1235
  ]
1236
- );
1237
 
1238
  $this->start_controls_tabs('premium_blog_pagination_colors');
1239
 
@@ -1253,7 +1334,7 @@ class Premium_Blog extends Widget_Base {
1253
  'value' => Scheme_Color::COLOR_2,
1254
  ],
1255
  'selectors' => [
1256
- '{{WRAPPER}} .premium-blog-pagination-container li *' => 'color: {{VALUE}};'
1257
  ]
1258
  ]
1259
  );
@@ -1267,7 +1348,7 @@ class Premium_Blog extends Widget_Base {
1267
  'value' => Scheme_Color::COLOR_1,
1268
  ],
1269
  'selectors' => [
1270
- '{{WRAPPER}} .premium-blog-pagination-container li' => 'background-color: {{VALUE}};'
1271
  ]
1272
  ]
1273
  );
@@ -1290,7 +1371,7 @@ class Premium_Blog extends Widget_Base {
1290
  'value' => Scheme_Color::COLOR_1,
1291
  ],
1292
  'selectors' => [
1293
- '{{WRAPPER}} .premium-blog-pagination-container li:hover *' => 'color: {{VALUE}};'
1294
  ]
1295
  ]
1296
  );
@@ -1304,7 +1385,7 @@ class Premium_Blog extends Widget_Base {
1304
  'value' => Scheme_Color::COLOR_2,
1305
  ],
1306
  'selectors' => [
1307
- '{{WRAPPER}} .premium-blog-pagination-container li:hover' => 'background-color: {{VALUE}};'
1308
  ]
1309
  ]
1310
  );
@@ -1327,7 +1408,21 @@ class Premium_Blog extends Widget_Base {
1327
  'value' => Scheme_Color::COLOR_1,
1328
  ],
1329
  'selectors' => [
1330
- '{{WRAPPER}} .premium-blog-pagination-container .current' => 'color: {{VALUE}};'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1331
  ]
1332
  ]
1333
  );
@@ -1341,7 +1436,7 @@ class Premium_Blog extends Widget_Base {
1341
  [
1342
  'name' => 'premium_blog_border',
1343
  'separator' => 'before',
1344
- 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li',
1345
  ]
1346
  );
1347
 
@@ -1351,7 +1446,7 @@ class Premium_Blog extends Widget_Base {
1351
  'type' => Controls_Manager::SLIDER,
1352
  'size_units' => ['px', '%' ,'em'],
1353
  'selectors' => [
1354
- '{{WRAPPER}} .premium-blog-pagination-container li' => 'border-radius: {{SIZE}}{{UNIT}};'
1355
  ]
1356
  ]
1357
  );
@@ -1373,7 +1468,7 @@ class Premium_Blog extends Widget_Base {
1373
  'type' => Controls_Manager::DIMENSIONS,
1374
  'size_units' => ['px', 'em', '%'],
1375
  'selectors' => [
1376
- '{{WRAPPER}} .premium-blog-pagination-container li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1377
  ]
1378
  ]
1379
  );
@@ -1676,7 +1771,7 @@ class Premium_Blog extends Widget_Base {
1676
  ?>
1677
  <div class="premium-blog-post-content" style="<?php if ( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px;'; endif; ?>">
1678
  <?php if ( $settings['premium_blog_excerpt'] === 'yes' ) {
1679
- echo premium_addons_get_excerpt_by_id( get_the_ID(), $settings['premium_blog_excerpt_length'], $excerpt_type, $excerpt_text, $excerpt_src );
1680
  } else {
1681
  the_content();
1682
  } ?>
@@ -2082,7 +2177,7 @@ class Premium_Blog extends Widget_Base {
2082
  'format' => '?paged=%#%',
2083
  'current' => max( 1, $paged ),
2084
  'total' => $page_tot,
2085
- 'prev_next' => true,
2086
  'prev_text' => sprintf( "&lsaquo; %s", $settings['premium_blog_prev_text'] ),
2087
  'next_text' => sprintf( "%s &rsaquo;", $settings['premium_blog_next_text'] ),
2088
  'end_size' => 1,
101
 
102
  $this->end_controls_section();
103
 
104
+ $this->start_controls_section('section_query_options',
105
+ [
106
+ 'label' => __('Query', 'premium-addons-for-elementor'),
107
+ ]
108
+ );
109
+
110
+ $this->add_control('category_filter_rule',
111
+ [
112
+ 'label' => __( 'Filter By Category Rule', 'premium-addons-for-elementor' ),
113
+ 'type' => Controls_Manager::SELECT,
114
+ 'default' => 'category__in',
115
+ 'separator' => 'before',
116
+ 'label_block' => true,
117
+ 'options' => [
118
+ 'category__in' => __( 'Match Categories', 'premium-addons-for-elementor' ),
119
+ 'category__not_in' => __( 'Exclude Categories', 'premium-addons-for-elementor' ),
120
+ ]
121
+ ]
122
+ );
123
+
124
+ $this->add_control('premium_blog_categories',
125
+ [
126
+ 'label' => __( 'Categories', 'premium-addons-for-elementor' ),
127
+ 'type' => Controls_Manager::SELECT2,
128
+ 'description' => __('Get posts for specific category(s)','premium-addons-for-elementor'),
129
+ 'label_block' => true,
130
+ 'multiple' => true,
131
+ 'options' => premium_blog_post_type_categories(),
132
+ ]
133
+ );
134
+
135
+ $this->add_control('tags_filter_rule',
136
+ [
137
+ 'label' => __( 'Filter By Tag Rule', 'premium-addons-for-elementor' ),
138
+ 'type' => Controls_Manager::SELECT,
139
+ 'default' => 'tag__in',
140
+ 'separator' => 'before',
141
+ 'label_block' => true,
142
+ 'options' => [
143
+ 'tag__in' => __( 'Match Tags', 'premium-addons-for-elementor' ),
144
+ 'tag__not_in' => __( 'Exclude Tags', 'premium-addons-for-elementor' ),
145
+ ]
146
+ ]
147
+ );
148
+
149
+ $this->add_control('premium_blog_tags',
150
+ [
151
+ 'label' => __( 'Tags', 'premium-addons-for-elementor' ),
152
+ 'type' => Controls_Manager::SELECT2,
153
+ 'description' => __('Get posts for specific tag(s)','premium-addons-for-elementor'),
154
+ 'label_block' => true,
155
+ 'multiple' => true,
156
+ 'options' => premium_blog_post_type_tags(),
157
+ ]
158
+ );
159
+
160
+ $this->add_control('author_filter_rule',
161
+ [
162
+ 'label' => __( 'Filter By Author Rule', 'premium-addons-for-elementor' ),
163
+ 'type' => Controls_Manager::SELECT,
164
+ 'default' => 'author__in',
165
+ 'separator' => 'before',
166
+ 'label_block' => true,
167
+ 'options' => [
168
+ 'author__in' => __( 'Match Authors', 'premium-addons-for-elementor' ),
169
+ 'author__not_in' => __( 'Exclude Authors', 'premium-addons-for-elementor' ),
170
+ ]
171
+ ]
172
+ );
173
+
174
+ $this->add_control('premium_blog_users',
175
+ [
176
+ 'label' => __( 'Authors', 'premium-addons-for-elementor' ),
177
+ 'type' => Controls_Manager::SELECT2,
178
+ 'label_block' => true,
179
+ 'multiple' => true,
180
+ 'options' => premium_blog_post_type_users(),
181
+ ]
182
+ );
183
+
184
+ $this->add_control('posts_filter_rule',
185
+ [
186
+ 'label' => __( 'Filter By Author Rule', 'premium-addons-for-elementor' ),
187
+ 'type' => Controls_Manager::SELECT,
188
+ 'default' => 'post__not_in',
189
+ 'separator' => 'before',
190
+ 'label_block' => true,
191
+ 'options' => [
192
+ 'post__in' => __( 'Match Post', 'premium-addons-for-elementor' ),
193
+ 'post__not_in' => __( 'Exclude Post', 'premium-addons-for-elementor' ),
194
+ ]
195
+ ]
196
+ );
197
+
198
+ $this->add_control('premium_blog_posts_exclude',
199
+ [
200
+ 'label' => __( 'Posts', 'premium-addons-for-elementor' ),
201
+ 'type' => Controls_Manager::SELECT2,
202
+ 'label_block' => true,
203
+ 'multiple' => true,
204
+ 'options' => premium_blog_posts_list(),
205
+ ]
206
+ );
207
+
208
+ $this->add_control('premium_blog_offset',
209
+ [
210
+ 'label' => __( 'Offset Count', 'premium-addons-for-elementor' ),
211
+ 'description' => __('The index of post to start with','premium-addons-for-elementor'),
212
+ 'type' => Controls_Manager::NUMBER,
213
+ 'default' => '0',
214
+ 'min' => '0',
215
+ ]
216
+ );
217
+
218
+ $this->add_control('premium_blog_order_by',
219
+ [
220
+ 'label' => __( 'Order By', 'premium-addons-for-elementor' ),
221
+ 'type' => Controls_Manager::SELECT,
222
+ 'separator' => 'before',
223
+ 'label_block' => true,
224
+ 'options' => [
225
+ 'none' => __('None', 'premium-addons-for-elementor'),
226
+ 'ID' => __('ID', 'premium-addons-for-elementor'),
227
+ 'author'=> __('Author', 'premium-addons-for-elementor'),
228
+ 'title' => __('Title', 'premium-addons-for-elementor'),
229
+ 'name' => __('Name', 'premium-addons-for-elementor'),
230
+ 'date' => __('Date', 'premium-addons-for-elementor'),
231
+ 'modified'=> __('Last Modified', 'premium-addons-for-elementor'),
232
+ 'rand' => __('Random', 'premium-addons-for-elementor'),
233
+ 'comment_count'=> __('Number of Comments', 'premium-addons-for-elementor'),
234
+ ],
235
+ 'default' => 'date'
236
+ ]
237
+ );
238
+
239
+ $this->add_control('premium_blog_order',
240
+ [
241
+ 'label' => __( 'Order', 'premium-addons-for-elementor' ),
242
+ 'type' => Controls_Manager::SELECT,
243
+ 'label_block' => true,
244
+ 'options' => [
245
+ 'DESC' => __('Descending', 'premium-addons-for-elementor'),
246
+ 'ASC' => __('Ascending', 'premium-addons-for-elementor'),
247
+ ],
248
+ 'default' => 'DESC'
249
+ ]
250
+ );
251
+
252
+ $this->end_controls_section();
253
+
254
  $this->start_controls_section('premium_blog_content_settings',
255
  [
256
  'label' => __('Display Options', 'premium-addons-for-elementor'),
597
  ]
598
  );
599
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
600
  $this->add_control('premium_blog_cat_tabs',
601
  [
602
  'label' => __('Filter Tabs', 'premium-addons-for-elementor'),
648
  ]
649
  );
650
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
651
  $this->add_control('premium_blog_new_tab',
652
  [
653
  'label' => __('Links in New Tab', 'premium-addons-for-elementor'),
772
  ]
773
  );
774
 
775
+ $this->add_control('premium_blog_number_of_posts',
776
+ [
777
+ 'label' => __('Posts Per Page', 'premium-addons-for-elementor'),
778
+ 'description' => __('Choose how many posts do you want to be displayed per page','premium-addons-for-elementor'),
779
+ 'type' => Controls_Manager::NUMBER,
780
+ 'min' => 1,
781
+ 'default' => 3,
782
+ ]
783
+ );
784
+
785
+ $this->add_control('premium_blog_total_posts_number',
786
+ [
787
+ 'label' => __('Total Number of Posts', 'premium-addons-for-elementor'),
788
+ 'type' => Controls_Manager::NUMBER,
789
+ 'default' => wp_count_posts()->publish,
790
+ 'min' => 1,
791
  'condition' => [
792
  'premium_blog_paging' => 'yes',
793
  ]
794
+ ]
795
+ );
796
+
797
+ $this->add_control('pagination_strings',
798
+ [
799
+ 'label' => __('Enable Pagination Next/Prev Strings', 'premium-addons-for-elementor'),
800
+ 'type' => Controls_Manager::SWITCHER,
801
+ 'default' => 'yes',
802
+ 'condition' => [
803
+ 'premium_blog_paging' => 'yes'
804
+ ]
805
+ ]
806
+ );
807
 
808
  $this->add_control('premium_blog_prev_text',
809
  [
811
  'type' => Controls_Manager::TEXT,
812
  'default' => __('Previous','premium-addons-for-elementor'),
813
  'condition' => [
814
+ 'premium_blog_paging' => 'yes',
815
+ 'pagination_strings' => 'yes'
816
+ ]
817
+ ]
818
+ );
819
+
820
+ $this->add_control('premium_blog_next_text',
821
+ [
822
+ 'label' => __( 'Next Page String', 'premium-addons-for-elementor' ),
823
+ 'type' => Controls_Manager::TEXT,
824
+ 'default' => __('Next','premium-addons-for-elementor'),
825
+ 'condition' => [
826
+ 'premium_blog_paging' => 'yes',
827
+ 'pagination_strings' => 'yes'
828
  ]
829
  ]
830
  );
847
  'icon' => 'fa fa-align-right',
848
  ],
849
  ],
850
+ 'selectors_dictionary' => [
851
+ 'left' => 'flex-start',
852
+ 'center' => 'center',
853
+ 'right' => 'flex-end',
854
+ ],
855
  'default' => 'right',
856
  'condition' => [
857
  'premium_blog_paging' => 'yes',
858
  ],
859
  'selectors' => [
860
+ '{{WRAPPER}} .premium-blog-pagination-container .page-numbers' => 'justify-content: {{VALUE}};',
861
+ ]
862
  ]
863
  );
864
 
1300
 
1301
  $this->start_controls_section('premium_blog_pagination_Style',
1302
  [
1303
+ 'label' => __('Pagination', 'premium-addons-for-elementor'),
1304
  'tab' => Controls_Manager::TAB_STYLE,
1305
  'condition' => [
1306
  'premium_blog_paging' => 'yes',
1312
  Group_Control_Typography::get_type(),
1313
  [
1314
  'name' => 'premium_blog_pagination_typo',
1315
+ 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li > .page-numbers',
1316
  ]
1317
+ );
1318
 
1319
  $this->start_controls_tabs('premium_blog_pagination_colors');
1320
 
1334
  'value' => Scheme_Color::COLOR_2,
1335
  ],
1336
  'selectors' => [
1337
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers' => 'color: {{VALUE}};'
1338
  ]
1339
  ]
1340
  );
1348
  'value' => Scheme_Color::COLOR_1,
1349
  ],
1350
  'selectors' => [
1351
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers' => 'background-color: {{VALUE}};'
1352
  ]
1353
  ]
1354
  );
1371
  'value' => Scheme_Color::COLOR_1,
1372
  ],
1373
  'selectors' => [
1374
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers:hover' => 'color: {{VALUE}};'
1375
  ]
1376
  ]
1377
  );
1385
  'value' => Scheme_Color::COLOR_2,
1386
  ],
1387
  'selectors' => [
1388
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers:hover' => 'background-color: {{VALUE}};'
1389
  ]
1390
  ]
1391
  );
1408
  'value' => Scheme_Color::COLOR_1,
1409
  ],
1410
  'selectors' => [
1411
+ '{{WRAPPER}} .premium-blog-pagination-container li span.current' => 'color: {{VALUE}};'
1412
+ ]
1413
+ ]
1414
+ );
1415
+
1416
+ $this->add_control('prmeium_blog_pagination_back_active_color',
1417
+ [
1418
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
1419
+ 'type' => Controls_Manager::COLOR,
1420
+ 'scheme' => [
1421
+ 'type' => Scheme_Color::get_type(),
1422
+ 'value' => Scheme_Color::COLOR_2,
1423
+ ],
1424
+ 'selectors' => [
1425
+ '{{WRAPPER}} .premium-blog-pagination-container li span.current' => 'background-color: {{VALUE}};'
1426
  ]
1427
  ]
1428
  );
1436
  [
1437
  'name' => 'premium_blog_border',
1438
  'separator' => 'before',
1439
+ 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers',
1440
  ]
1441
  );
1442
 
1446
  'type' => Controls_Manager::SLIDER,
1447
  'size_units' => ['px', '%' ,'em'],
1448
  'selectors' => [
1449
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers' => 'border-radius: {{SIZE}}{{UNIT}};'
1450
  ]
1451
  ]
1452
  );
1468
  'type' => Controls_Manager::DIMENSIONS,
1469
  'size_units' => ['px', 'em', '%'],
1470
  'selectors' => [
1471
+ '{{WRAPPER}} .premium-blog-pagination-container li .page-numbers' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1472
  ]
1473
  ]
1474
  );
1771
  ?>
1772
  <div class="premium-blog-post-content" style="<?php if ( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px;'; endif; ?>">
1773
  <?php if ( $settings['premium_blog_excerpt'] === 'yes' ) {
1774
+ echo premium_blog_get_excerpt_by_id( get_the_ID(), $settings['premium_blog_excerpt_length'], $excerpt_type, $excerpt_text, $excerpt_src );
1775
  } else {
1776
  the_content();
1777
  } ?>
2177
  'format' => '?paged=%#%',
2178
  'current' => max( 1, $paged ),
2179
  'total' => $page_tot,
2180
+ 'prev_next' => 'yes' === $settings['pagination_strings'] ? true : false,
2181
  'prev_text' => sprintf( "&lsaquo; %s", $settings['premium_blog_prev_text'] ),
2182
  'next_text' => sprintf( "%s &rsaquo;", $settings['premium_blog_next_text'] ),
2183
  'end_size' => 1,
widgets/premium-grid.php CHANGED
@@ -2352,7 +2352,7 @@ class Premium_Grid extends Widget_Base {
2352
  ?>
2353
  <div class="premium-gallery-video-wrap" data-type="<?php echo $item['premium_gallery_video_type']; ?>">
2354
  <?php if( 'hosted' !== $item['premium_gallery_video_type'] ) : ?>
2355
- <iframe src="<?php echo $link; ?>"></iframe>
2356
  <?php else:
2357
  $link = empty( $item['premium_gallery_video_self_url'] ) ? $item['premium_gallery_video_self']['url'] : $item['premium_gallery_video_self_url'];
2358
  ?>
2352
  ?>
2353
  <div class="premium-gallery-video-wrap" data-type="<?php echo $item['premium_gallery_video_type']; ?>">
2354
  <?php if( 'hosted' !== $item['premium_gallery_video_type'] ) : ?>
2355
+ <div class="premium-gallery-iframe-wrap" data-src="<?php echo $link; ?>"></div>
2356
  <?php else:
2357
  $link = empty( $item['premium_gallery_video_self_url'] ) ? $item['premium_gallery_video_self']['url'] : $item['premium_gallery_video_self_url'];
2358
  ?>
widgets/premium-pricing-table.php CHANGED
@@ -1838,29 +1838,10 @@ class Premium_Pricing_Table extends Widget_Base {
1838
  ],
1839
  'selectors' => [
1840
  '{{WRAPPER}} .premium-badge-left .corner' => 'border-top-color: {{VALUE}}',
1841
- '{{WRAPPER}} .premium-badge-circle' => 'background-color: {{VALUE}}'
1842
  ],
1843
  'condition' => [
1844
- 'ribbon_type' => 'triangle',
1845
- 'premium_pricing_table_badge_position' => 'left'
1846
- ]
1847
- ]
1848
- );
1849
-
1850
- $this->add_control('premium_pricing_badge_right_color',
1851
- [
1852
- 'label' => __('Background Color', 'premium-addons-for-elementor'),
1853
- 'type' => Controls_Manager::COLOR,
1854
- 'scheme' => [
1855
- 'type' => Scheme_Color::get_type(),
1856
- 'value' => Scheme_Color::COLOR_1,
1857
- ],
1858
- 'selectors' => [
1859
- '{{WRAPPER}} .premium-badge-right .corner' => 'border-right-color: {{VALUE}};'
1860
- ],
1861
- 'condition' => [
1862
- 'ribbon_type' => 'triangle',
1863
- 'premium_pricing_table_badge_position' => 'left'
1864
  ]
1865
  ]
1866
  );
1838
  ],
1839
  'selectors' => [
1840
  '{{WRAPPER}} .premium-badge-left .corner' => 'border-top-color: {{VALUE}}',
1841
+ '{{WRAPPER}} .premium-badge-right .corner' => 'border-right-color: {{VALUE}}'
1842
  ],
1843
  'condition' => [
1844
+ 'ribbon_type' => 'triangle'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1845
  ]
1846
  ]
1847
  );