Premium Addons for Elementor - Version 3.2.6

Version Description

  • Tweak: _content_template() method added for Carousel widget to enhance rendering speed.
  • Fixed: Description container is rendered even if text editor is empty in Banner widget.
Download this release

Release Info

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

Code changes from version 3.2.5 to 3.2.6

admin/assets/pa-elements-font/css/pa-elements.css CHANGED
@@ -71,19 +71,19 @@
71
  content: "\e90a";
72
  }
73
  .pa-grid-icon:before {
74
- content: "\e90b";
75
  }
76
  .pa-image-button:before {
77
- content: "\e90c";
78
  }
79
  .pa-image-scroll:before {
80
  content: "\e900";
81
  }
82
  .pa-image-separator:before {
83
- content: "\e90d";
84
  }
85
  .pa-maps:before {
86
- content: "\e90e";
87
  }
88
  .pa-modal-box:before {
89
  content: "\e90f";
71
  content: "\e90a";
72
  }
73
  .pa-grid-icon:before {
74
+ content: "\e90c";
75
  }
76
  .pa-image-button:before {
77
+ content: "\e90d";
78
  }
79
  .pa-image-scroll:before {
80
  content: "\e900";
81
  }
82
  .pa-image-separator:before {
83
+ content: "\e90e";
84
  }
85
  .pa-maps:before {
86
+ content: "\e90b";
87
  }
88
  .pa-modal-box:before {
89
  content: "\e90f";
admin/settings/version-control.php CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
- <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 3.2.4</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
+ <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 3.2.5</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
assets/js/premium-addons.js CHANGED
@@ -295,85 +295,129 @@
295
  };
296
 
297
  /****** Premium Carousel Handler ******/
298
- var PremiumCarouselHandler = function($scope, $) {
299
- var carouselElement = $scope
300
- .find(".premium-carousel-wrapper")
301
- .each(function() {
302
- var carouselSettings = $(this).data("settings");
303
- function slideToShow(slick) {
 
 
 
 
304
  slidesToShow = slick.options.slidesToShow;
305
 
306
  windowWidth = jQuery(window).width();
 
307
  if ( windowWidth > carouselSettings["tabletBreak"] ) {
308
  slidesToShow = carouselSettings["slidesDesk"];
309
  }
 
310
  if ( windowWidth <= carouselSettings["tabletBreak"] ) {
311
  slidesToShow = carouselSettings["slidesTab"];
312
  }
 
313
  if ( windowWidth <= carouselSettings["mobileBreak"] ) {
314
  slidesToShow = carouselSettings["slidesMob"];
315
  }
 
316
  return slidesToShow;
 
317
  }
318
- $(this).on("init", function(event, slick) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  event.preventDefault();
320
- $(this)
321
- .find("item-wrapper.slick-active")
322
- .each(function(index, el) {
323
- $this = $(this);
324
  $this.addClass($this.data("animation"));
325
  });
 
326
  $(".slick-track").addClass("translate");
 
327
  });
328
- $(this)
329
- .find(".premium-carousel-inner")
330
- .slick({
331
- vertical: carouselSettings["vertical"],
332
  slidesToScroll: carouselSettings["slidesToScroll"],
333
- slidesToShow: carouselSettings["slidesToShow"],
334
- responsive: [
335
  {
336
  breakpoint: carouselSettings["tabletBreak"],
337
  settings: {
338
- slidesToShow: carouselSettings["slidesTab"],
339
- slidesToScroll: carouselSettings["slidesTab"]
340
  }
341
  },
342
  {
343
  breakpoint: carouselSettings["mobileBreak"],
344
- settings: {
345
- slidesToShow: carouselSettings["slidesMob"],
346
- slidesToScroll: carouselSettings["slidesMob"]
347
  }
348
  }
349
  ],
350
- fade: carouselSettings["fade"],
351
- infinite: carouselSettings["infinite"],
352
- speed: carouselSettings["speed"],
353
- autoplay: carouselSettings["autoplay"],
354
- autoplaySpeed: carouselSettings["autoplaySpeed"],
355
- draggable: carouselSettings["draggable"],
356
- touchMove: carouselSettings["touchMove"],
357
- rtl: carouselSettings["rtl"],
358
- useTransform: true,
359
  adaptiveHeight: carouselSettings["adaptiveHeight"],
360
- pauseOnHover: carouselSettings["pauseOnHover"],
361
- centerMode: carouselSettings["centerMode"],
362
- centerPadding: carouselSettings["centerPadding"],
363
- arrows: carouselSettings["arrows"],
364
- nextArrow: carouselSettings["nextArrow"],
365
- prevArrow: carouselSettings["prevArrow"],
366
- dots: carouselSettings["dots"],
367
- customPaging: function(slider, i) {
368
- return '<i class="' + carouselSettings["customPaging"] + '"></i>';
369
  }
370
  });
371
- $(this).on("afterChange", function(
372
- event,
373
- slick,
374
- currentSlide,
375
- nextSlide
376
- ) {
377
  slidesScrolled = slick.options.slidesToScroll;
378
  slidesToShow = slideToShow(slick);
379
  centerMode = slick.options.centerMode;
@@ -401,6 +445,7 @@
401
  }
402
  }
403
  });
 
404
  $(this).on("beforeChange", function(event, slick, currentSlide) {
405
  $inViewPort = $(this).find("[data-slick-index='" + currentSlide + "']");
406
  if( 'null' != carouselSettings["animation"] ) {
@@ -442,6 +487,7 @@
442
  marginFix.element = $("a.carousel-arrow");
443
  marginFix.setWidth("horizontal");
444
  });
 
445
  };
446
 
447
  /****** Premium Banner Handler ******/
295
  };
296
 
297
  /****** Premium Carousel Handler ******/
298
+ var PremiumCarouselHandler = function( $scope, $ ) {
299
+
300
+ var isEdit = elementorFrontend.isEditMode();
301
+
302
+ var carouselElement = $scope.find(".premium-carousel-wrapper").each( function() {
303
+ var $carouselElement = $(this);
304
+ var carouselSettings = $( this ).data("settings");
305
+
306
+ function slideToShow ( slick ) {
307
+
308
  slidesToShow = slick.options.slidesToShow;
309
 
310
  windowWidth = jQuery(window).width();
311
+
312
  if ( windowWidth > carouselSettings["tabletBreak"] ) {
313
  slidesToShow = carouselSettings["slidesDesk"];
314
  }
315
+
316
  if ( windowWidth <= carouselSettings["tabletBreak"] ) {
317
  slidesToShow = carouselSettings["slidesTab"];
318
  }
319
+
320
  if ( windowWidth <= carouselSettings["mobileBreak"] ) {
321
  slidesToShow = carouselSettings["slidesMob"];
322
  }
323
+
324
  return slidesToShow;
325
+
326
  }
327
+
328
+ if ( isEdit ) {
329
+
330
+ $( this ).find( '.item-wrapper' ).each( function( index, slide ) {
331
+
332
+ var templateID = $( slide ).data('template');
333
+
334
+ if ( undefined !== templateID ) {
335
+ $.ajax({
336
+ type: 'GET',
337
+ url: PremiumProSettings.ajaxurl,
338
+ dataType: 'html',
339
+ data: {
340
+ action: 'get_elementor_template_content',
341
+ templateID: templateID
342
+ }
343
+ }).success( function( response ) {
344
+
345
+ var data = JSON.parse( response ).data;
346
+
347
+ if ( undefined !== data.template_content ) {
348
+
349
+ $( slide ).html( data.template_content );
350
+
351
+ $carouselElement.find(".premium-carousel-inner").slick('refresh');
352
+ }
353
+
354
+ });
355
+ }
356
+
357
+ });
358
+
359
+
360
+ // $( this ).find( ".premium-carousel-inner" ).slick( 'refresh' );
361
+ }
362
+
363
+ $( this ).on("init", function( event ) {
364
+
365
  event.preventDefault();
366
+
367
+ $( this ).find("item-wrapper.slick-active").each(function() {
368
+
369
+ $this = $( this );
370
  $this.addClass($this.data("animation"));
371
  });
372
+
373
  $(".slick-track").addClass("translate");
374
+
375
  });
376
+
377
+ $( this ).find(".premium-carousel-inner").slick({
378
+ vertical: carouselSettings["vertical"],
 
379
  slidesToScroll: carouselSettings["slidesToScroll"],
380
+ slidesToShow: carouselSettings["slidesToShow"],
381
+ responsive: [
382
  {
383
  breakpoint: carouselSettings["tabletBreak"],
384
  settings: {
385
+ slidesToShow: carouselSettings["slidesTab"],
386
+ slidesToScroll: carouselSettings["slidesTab"]
387
  }
388
  },
389
  {
390
  breakpoint: carouselSettings["mobileBreak"],
391
+ settings: {
392
+ slidesToShow: carouselSettings["slidesMob"],
393
+ slidesToScroll: carouselSettings["slidesMob"]
394
  }
395
  }
396
  ],
397
+ fade: carouselSettings["fade"],
398
+ infinite: carouselSettings["infinite"],
399
+ speed: carouselSettings["speed"],
400
+ autoplay: carouselSettings["autoplay"],
401
+ autoplaySpeed: carouselSettings["autoplaySpeed"],
402
+ draggable: carouselSettings["draggable"],
403
+ touchMove: carouselSettings["touchMove"],
404
+ rtl: carouselSettings["rtl"],
405
+ useTransform: true,
406
  adaptiveHeight: carouselSettings["adaptiveHeight"],
407
+ pauseOnHover: carouselSettings["pauseOnHover"],
408
+ centerMode: carouselSettings["centerMode"],
409
+ centerPadding: carouselSettings["centerPadding"],
410
+ arrows: carouselSettings["arrows"],
411
+ nextArrow: carouselSettings["nextArrow"],
412
+ prevArrow: carouselSettings["prevArrow"],
413
+ dots: carouselSettings["dots"],
414
+ customPaging: function( slider, i ) {
415
+ return '<i class="' + carouselSettings["customPaging"] + '"></i>';
416
  }
417
  });
418
+
419
+ $( this ).on("afterChange", function( event, slick, currentSlide, nextSlide ) {
420
+
 
 
 
421
  slidesScrolled = slick.options.slidesToScroll;
422
  slidesToShow = slideToShow(slick);
423
  centerMode = slick.options.centerMode;
445
  }
446
  }
447
  });
448
+
449
  $(this).on("beforeChange", function(event, slick, currentSlide) {
450
  $inViewPort = $(this).find("[data-slick-index='" + currentSlide + "']");
451
  if( 'null' != carouselSettings["animation"] ) {
487
  marginFix.element = $("a.carousel-arrow");
488
  marginFix.setWidth("horizontal");
489
  });
490
+
491
  };
492
 
493
  /****** Premium Banner Handler ******/
assets/js/premium-vscroll.js CHANGED
@@ -15,9 +15,9 @@
15
  instance.init();
16
 
17
  // var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);
18
- // var isTouch = ( ( 'ontouchstart' in window ) || ( navigator.msMaxTouchPoints > 0 ) || ( navigator.maxTouchPoints ) );
19
-
20
-
21
  // if( touch ) {
22
  // instance = new premiumVerticalScroll2( vScrollElem, vScrollSettings );
23
  // instance.init();
@@ -31,6 +31,7 @@
31
  // }
32
  // }
33
 
 
34
  };
35
 
36
 
@@ -39,16 +40,17 @@
39
  var self = this,
40
  $instance = $selector,
41
  $window = $( window ),
 
42
  checkTemps = $selector.find( ".premium-vscroll-sections-wrap" ).length,
43
  deviceType = $("body").data("elementor-device-mode"),
44
- $itemsList = $(".premium-vscroll-dot-item", $instance ),
45
- $menuItems = $(".premium-vscroll-nav-item", $instance ),
46
- sections = {},
47
- lastScrollTop = 0;
48
 
49
 
50
  var $lastItem = $itemsList.last(),
51
- lastSectionId = $lastItem.data("menuanchor");
 
52
 
53
  self.init = function() {
54
 
@@ -64,11 +66,10 @@
64
  $.scrollify({
65
  section: ".premium-vscroll-section",
66
  updateHash: false,
67
- // standardScrollElements: "#" + lastSectionId,
68
  scrollSpeed: settings.speed,
69
  overflowScroll: settings.overflow,
70
  setHeights: settings.setHeight,
71
- templates: checkTemps,
72
  before: function( index ) {
73
 
74
  $menuItems.removeClass("active");
@@ -79,7 +80,7 @@
79
 
80
  },
81
  after: function( index ) {
82
- console.log( index );
83
  if ( index === $lastItem.index() ) {
84
  // $.scrollify.disable();
85
  }
@@ -120,162 +121,51 @@
120
 
121
  };
122
 
123
- self.getDirection = function() {
124
-
125
- var st = window.pageYOffset || document.documentElement.scrollTop,
126
- direction = null;
127
-
128
-
129
- if ( st > lastScrollTop ) {
130
- direction = "down";
131
- } else {
132
- direction = "up";
133
- }
134
-
135
- lastScrollTop = st <= 0 ? 0 : st;
136
-
137
- return direction;
138
-
139
- };
140
-
141
- self.checkNextSection = function( object, key ) {
142
- var keys = Object.keys( object ),
143
- idIndex = keys.indexOf( key ),
144
- nextIndex = ( idIndex += 1 );
145
-
146
- if ( nextIndex >= keys.length ) {
147
-
148
- return false;
149
-
150
- }
151
-
152
- var nextKey = keys[ nextIndex ];
153
-
154
- return nextKey;
155
-
156
- };
157
-
158
- self.checkPrevSection = function( object, key ) {
159
- var keys = Object.keys( object ),
160
- idIndex = keys.indexOf( key ),
161
- prevIndex = ( idIndex -= 1 );
162
-
163
- if ( 0 > idIndex ) {
164
-
165
- return false;
166
-
167
- }
168
-
169
- var prevKey = keys[ prevIndex ];
170
-
171
- return prevKey;
172
-
173
- };
174
-
175
- self.getSectionId = function( $selector ) {
176
-
177
- return $selector.attr("id");
178
-
179
- };
180
-
181
  self.onWheel = function( event ) {
182
 
183
- var $target = $( event.target ),
184
- sectionId = $.scrollify.currentScroll(),
185
- direction = self.getDirection(),
186
- isDisabled = $.scrollify.isDisabled(),
187
- newSectionId = false,
188
- nextSectionId = false,
189
- prevSectionId = false,
190
- currentSectionID = self.getSectionId( $.scrollify.current() ),
191
- windowScrollTop = $window.scrollTop(),
192
- $lastselector = $('#' + lastSectionId );
193
-
194
-
195
- nextSectionId = self.checkNextSection( sections, sectionId );
196
- prevSectionId = self.checkPrevSection( sections, sectionId );
197
-
198
- if ( "up" === direction ) {
199
- if (! nextSectionId && sections[ sectionId ].offset < windowScrollTop ) {
200
- newSectionId = sectionId;
201
- } else {
202
- newSectionId = prevSectionId;
203
- }
204
- }
205
-
206
- if ( "down" === direction ) {
207
- if (
208
- !prevSectionId &&
209
- sections[sectionId].offset > windowScrollTop + 5
210
- ) {
211
- newSectionId = sectionId;
212
- } else {
213
- newSectionId = nextSectionId;
214
- }
215
- }
216
-
217
- if( newSectionId ) {
218
 
219
  $(".premium-vscroll-dots, .premium-vscroll-nav-menu").removeClass(
220
  "premium-vscroll-dots-hide"
221
  );
222
-
223
- if( lastSectionId === sectionId && "up" === direction ) {
224
-
225
- // $.scrollify.enable();
226
-
227
- }
228
-
229
-
230
- } else {
231
-
232
- if ( "down" === direction ) {
233
-
234
- if ( ! nextSectionId ) {
235
-
236
- if ( $lastselector.offset().top + $lastselector.innerHeight() - $( document ).scrollTop() > 600 ) {
237
-
238
- $.scrollify.disable();
239
-
240
- $(".premium-vscroll-dots, .premium-vscroll-nav-menu").addClass(
241
- "premium-vscroll-dots-hide"
242
- );
243
- }
244
-
245
- }
246
- } else if ( "up" === direction ) {
247
-
248
- // if ( prevSectionId ) {
249
- //
250
- // $.scrollify.enable();
251
- //
252
- // $(".premium-vscroll-dots, .premium-vscroll-nav-menu").addClass(
253
- // "premium-vscroll-dots-hide"
254
- // );
255
- //
256
- // }
257
 
258
- }
259
 
260
- }
 
 
261
 
 
262
 
 
 
 
263
 
 
 
 
 
264
  };
265
 
266
-
267
  self.moveSectionDown = function() {
268
  $.scrollify.next();
269
- };
270
 
271
  self.moveSectionUp = function() {
272
  $.scrollify.previous();
273
- };
274
 
275
  self.moveToSection = function( index ) {
276
 
277
  $.scrollify.move( index );
278
- };
279
 
280
  self.setSectionsData = function() {
281
 
@@ -287,13 +177,6 @@
287
 
288
  $section.addClass( "premium-vscroll-section" );
289
 
290
- if ( $section[0] ) {
291
- sections[ sectionId ] = {
292
- selector: $section
293
- };
294
- }
295
-
296
-
297
  });
298
 
299
  };
@@ -543,7 +426,7 @@
543
  var $this = $(this),
544
  sectionId = $this.data("menuanchor"),
545
  $section = $("#" + sectionId);
546
- if ( $section[0] ) {
547
  sections[sectionId] = {
548
  selector: $section,
549
  offset: Math.round($section.offset().top),
@@ -830,4 +713,4 @@
830
  PremiumVerticalScrollHandler
831
  );
832
  });
833
- })( jQuery );
15
  instance.init();
16
 
17
  // var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);
18
+ // var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));
19
+ //
20
+ //
21
  // if( touch ) {
22
  // instance = new premiumVerticalScroll2( vScrollElem, vScrollSettings );
23
  // instance.init();
31
  // }
32
  // }
33
 
34
+
35
  };
36
 
37
 
40
  var self = this,
41
  $instance = $selector,
42
  $window = $( window ),
43
+ $htmlBody = $("html, body"),
44
  checkTemps = $selector.find( ".premium-vscroll-sections-wrap" ).length,
45
  deviceType = $("body").data("elementor-device-mode"),
46
+ $itemsList = $(".premium-vscroll-dot-item", $instance),
47
+ $menuItems = $(".premium-vscroll-nav-item", $instance),
48
+ animated = 0;
 
49
 
50
 
51
  var $lastItem = $itemsList.last(),
52
+ lastSectionId = $lastItem.data("menuanchor"),
53
+ lastOffset = Math.round( $( "#" + lastSectionId ).offset().top );
54
 
55
  self.init = function() {
56
 
66
  $.scrollify({
67
  section: ".premium-vscroll-section",
68
  updateHash: false,
69
+ standardScrollElements: "#" + lastSectionId,
70
  scrollSpeed: settings.speed,
71
  overflowScroll: settings.overflow,
72
  setHeights: settings.setHeight,
 
73
  before: function( index ) {
74
 
75
  $menuItems.removeClass("active");
80
 
81
  },
82
  after: function( index ) {
83
+
84
  if ( index === $lastItem.index() ) {
85
  // $.scrollify.disable();
86
  }
121
 
122
  };
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  self.onWheel = function( event ) {
125
 
126
+ var $target = $( event.target ),
127
+ sectionSelector = checkTemps ? ".premium-vscroll-temp" : ".elementor-top-section",
128
+ $section = $target.closest( sectionSelector ),
129
+ sectionId = $section.attr( "id" ),
130
+ $currentSection = $.scrollify.current();
131
+
132
+ //re-enable Scrollify
133
+ if ( sectionId !== lastSectionId && $section.hasClass("premium-vscroll-section") && $.scrollify.isDisabled() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
  $(".premium-vscroll-dots, .premium-vscroll-nav-menu").removeClass(
136
  "premium-vscroll-dots-hide"
137
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
+ $.scrollify.enable();
140
 
141
+ }
142
+
143
+ if ( ! $section.hasClass("premium-vscroll-section") && $.scrollify.isDisabled() ) {
144
 
145
+ $(".premium-vscroll-tooltip").hide();
146
 
147
+ $(".premium-vscroll-dots, .premium-vscroll-nav-menu").addClass(
148
+ "premium-vscroll-dots-hide"
149
+ );
150
 
151
+ }
152
+
153
+
154
+
155
  };
156
 
 
157
  self.moveSectionDown = function() {
158
  $.scrollify.next();
159
+ }
160
 
161
  self.moveSectionUp = function() {
162
  $.scrollify.previous();
163
+ }
164
 
165
  self.moveToSection = function( index ) {
166
 
167
  $.scrollify.move( index );
168
+ }
169
 
170
  self.setSectionsData = function() {
171
 
177
 
178
  $section.addClass( "premium-vscroll-section" );
179
 
 
 
 
 
 
 
 
180
  });
181
 
182
  };
426
  var $this = $(this),
427
  sectionId = $this.data("menuanchor"),
428
  $section = $("#" + sectionId);
429
+ if ($section[0]) {
430
  sections[sectionId] = {
431
  selector: $section,
432
  offset: Math.round($section.offset().top),
713
  PremiumVerticalScrollHandler
714
  );
715
  });
716
+ })( jQuery );
includes/class-addons-integration.php CHANGED
@@ -8,6 +8,8 @@ class Premium_Addons_Integration {
8
 
9
  private static $instance = null;
10
 
 
 
11
  /**
12
  * Initialize integration hooks
13
  *
@@ -30,6 +32,13 @@ class Premium_Addons_Integration {
30
  add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_frontend_scripts' ) );
31
 
32
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_maps_required_script' ) );
 
 
 
 
 
 
 
33
  }
34
 
35
  /**
@@ -278,6 +287,37 @@ class Premium_Addons_Integration {
278
 
279
  }
280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  /**
282
  * Register addon by file name
283
  *
8
 
9
  private static $instance = null;
10
 
11
+ public static $frontend = null;
12
+
13
  /**
14
  * Initialize integration hooks
15
  *
32
  add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_frontend_scripts' ) );
33
 
34
  add_action( 'wp_enqueue_scripts', array( $this, 'premium_maps_required_script' ) );
35
+
36
+
37
+ add_action( 'wp_ajax_get_elementor_template_content', array( $this, 'get_template_content' ) );
38
+
39
+ if( defined('ELEMENTOR_VERSION') ) {
40
+ self::$frontend = new \Elementor\Frontend;
41
+ }
42
  }
43
 
44
  /**
287
 
288
  }
289
 
290
+ /*
291
+ * Get Template Content
292
+ *
293
+ * Get Elementor template HTML content.
294
+ *
295
+ * @since 3.2.6
296
+ * @access public
297
+ *
298
+ */
299
+ public function get_template_content() {
300
+
301
+ $template_id = $_GET['templateID'];
302
+
303
+ if( ! isset( $template_id ) ) {
304
+ return;
305
+ }
306
+
307
+ $template_content = self::$frontend->get_builder_content( $template_id, true );
308
+
309
+ if ( empty ( $template_content ) || ! isset( $template_content ) ) {
310
+ wp_send_json_error();
311
+ }
312
+
313
+ $data = array(
314
+ 'template_content' => $template_content
315
+ );
316
+
317
+ wp_send_json_success( $data );
318
+
319
+ }
320
+
321
  /**
322
  * Register addon by file name
323
  *
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.2.5
7
  Author: Leap13
8
  Author URI: http://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.2.5');
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.2.4');
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.2.6
7
  Author: Leap13
8
  Author URI: http://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.2.6');
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.2.5');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
  /*
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
- Stable tag: 3.2.5
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -139,6 +139,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
142
  = 3.2.5 =
143
 
144
  - Fixed: Vimeo video thumbnail issue with `Overlay` option disabled.
5
  Requires at least: 4.5
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
+ Stable tag: 3.2.6
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
139
 
140
  == Changelog ==
141
 
142
+ = 3.2.6 =
143
+
144
+ - Tweak: `_content_template()` method added for Carousel widget to enhance rendering speed.
145
+ - Fixed: Description container is rendered even if text editor is empty in Banner widget.
146
+
147
  = 3.2.5 =
148
 
149
  - Fixed: Vimeo video thumbnail issue with `Overlay` option disabled.
widgets/premium-banner.php CHANGED
@@ -764,9 +764,11 @@ class Premium_Banner extends Widget_Base {
764
  <?php endif; ?>
765
  <div class="premium_addons-banner-ib-desc">
766
  <?php echo $full_title; ?>
767
- <div class="premium_addons-banner-ib-content premium_banner_content">
768
- <div <?php echo $this->get_render_attribute_string('premium_banner_description'); ?>><?php echo $settings[ 'premium_banner_description' ]; ?></div>
769
- </div>
 
 
770
  <?php if( 'yes' == $settings['premium_banner_link_switcher'] && !empty( $settings['premium_banner_more_text'] ) ) : ?>
771
 
772
  <div class ="premium-banner-read-more">
764
  <?php endif; ?>
765
  <div class="premium_addons-banner-ib-desc">
766
  <?php echo $full_title; ?>
767
+ <?php if( ! empty( $settings['premium_banner_description'] ) ) : ?>
768
+ <div class="premium_addons-banner-ib-content premium_banner_content">
769
+ <div <?php echo $this->get_render_attribute_string('premium_banner_description'); ?>><?php echo $settings[ 'premium_banner_description' ]; ?></div>
770
+ </div>
771
+ <?php endif; ?>
772
  <?php if( 'yes' == $settings['premium_banner_link_switcher'] && !empty( $settings['premium_banner_more_text'] ) ) : ?>
773
 
774
  <div class ="premium-banner-read-more">
widgets/premium-carousel.php CHANGED
@@ -290,6 +290,7 @@ class Premium_Carousel extends Widget_Base {
290
  [
291
  'label' => __('Animations', 'premium-addons-for-elementor'),
292
  'type' => Controls_Manager::ANIMATION,
 
293
  ]
294
  );
295
 
@@ -964,7 +965,7 @@ class Premium_Carousel extends Widget_Base {
964
  $dot_icon = '';
965
  $customPaging = '';
966
  }
967
- $extra_class = $settings['premium_carousel_extra_class'] !== '' ? ' '.$settings['premium_carousel_extra_class'] : '';
968
 
969
  $animation_class = $settings['premium_carousel_animation_list'];
970
  $animation = ! empty( $animation_class ) ? 'animated ' . $animation_class : 'null';
@@ -1051,4 +1052,297 @@ class Premium_Carousel extends Widget_Base {
1051
  </div>
1052
  <?php
1053
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1054
  }
290
  [
291
  'label' => __('Animations', 'premium-addons-for-elementor'),
292
  'type' => Controls_Manager::ANIMATION,
293
+ 'render_type' => 'template'
294
  ]
295
  );
296
 
965
  $dot_icon = '';
966
  $customPaging = '';
967
  }
968
+ $extra_class = ! empty ( $settings['premium_carousel_extra_class'] ) ? ' ' . $settings['premium_carousel_extra_class'] : '';
969
 
970
  $animation_class = $settings['premium_carousel_animation_list'];
971
  $animation = ! empty( $animation_class ) ? 'animated ' . $animation_class : 'null';
1052
  </div>
1053
  <?php
1054
  }
1055
+
1056
+ protected function _content_template() {
1057
+
1058
+ ?>
1059
+
1060
+ <#
1061
+
1062
+ var vertical = 'vertical' === settings.premium_carousel_slider_type ? true : false,
1063
+ slidesOnDesk = settings.premium_carousel_responsive_desktop,
1064
+ slidesToScroll = 1,
1065
+ arrowClass = '',
1066
+ iconNextClass = '',
1067
+ iconPrevClass = '',
1068
+ dotIcon = '',
1069
+ verticalAlignment= '';
1070
+
1071
+ if( 'all' === settings.premium_carousel_slides_to_show ) {
1072
+ slidesToScroll = '' !== slidesOnDesk ? slidesOnDesk : 1;
1073
+ } else {
1074
+ slidesToScroll = 1;
1075
+ }
1076
+
1077
+ var slidesToShow = '' !== slidesOnDesk ? slidesOnDesk : 1,
1078
+ slidesOnTabs = settings.premium_carousel_responsive_tabs,
1079
+ slidesOnMob = settings.premium_carousel_responsive_mobile;
1080
+
1081
+ if( '' === settings.premium_carousel_responsive_tabs ) {
1082
+ slidesOnTabs = slidesOnDesk;
1083
+ }
1084
+
1085
+ if( '' === settings.premium_carousel_responsive_mobile ) {
1086
+ slidesOnMob = slidesOnDesk;
1087
+ }
1088
+
1089
+ var infinite = settings.premium_carousel_loop === 'yes' ? true : false,
1090
+ fade = settings.premium_carousel_fade === 'yes' ? true : false,
1091
+ speed = '' !== settings.premium_carousel_speed ? settings.premium_carousel_speed : '',
1092
+ autoplay = settings.premium_carousel_autoplay === 'yes' ? true : false,
1093
+ autoplaySpeed = '' !== settings.premium_carousel_autoplay_speed ? settings.premium_carousel_autoplay_speed : '',
1094
+ draggable = settings.premium_carousel_draggable_effect === 'yes' ? true : false,
1095
+ touchMove = settings.premium_carousel_touch_move === 'yes' ? true : false,
1096
+ dir = '',
1097
+ rtl = false;
1098
+
1099
+ if( 'yes' === settings.premium_carousel_RTL_Mode ) {
1100
+ rtl = true;
1101
+ dir = 'dir="rtl"';
1102
+ }
1103
+
1104
+ var adaptiveHeight = 'yes' === settings.premium_carousel_adaptive_height ? true : false,
1105
+ pauseOnHover = 'yes' === settings.premium_carousel_pausehover ? true : false,
1106
+ centerMode = 'yes' === settings.premium_carousel_center_mode ? true : false,
1107
+ centerPadding = '' !== settings.premium_carousel_space_btw_items ? settings.premium_carousel_space_btw_items + "px" : '';
1108
+
1109
+ // Navigation arrow setting setup
1110
+ if( 'yes' === settings.premium_carousel_navigation_show ) {
1111
+
1112
+ var arrows = true;
1113
+
1114
+ if( 'vertical' === settings.premium_carousel_slider_type ) {
1115
+ verticalAlignment = "ver-carousel-arrow";
1116
+ } else {
1117
+ verticalAlignment = "carousel-arrow";
1118
+ }
1119
+
1120
+ if( 'circle-bg' === settings.premium_carousel_arrow_style ) {
1121
+ arrowClass = ' circle-bg';
1122
+ }
1123
+ if( 'square-bg' === settings.premium_carousel_arrow_style ) {
1124
+ arrowClass = ' square-bg';
1125
+ }
1126
+ if( 'square-border' === settings.premium_carousel_arrow_style ) {
1127
+ arrowClass = ' square-border';
1128
+ }
1129
+ if( 'circle-border' === settings.premium_carousel_arrow_style ) {
1130
+ arrowClass = ' circle-border';
1131
+ }
1132
+ if( 'default' === settings.premium_carousel_arrow_style ) {
1133
+ arrowClass = '';
1134
+ }
1135
+
1136
+ if( 'vertical' === settings.premium_carousel_slider_type ) {
1137
+
1138
+ var iconNext = settings.premium_carousel_arrow_icon_next_ver;
1139
+
1140
+ if( iconNext === 'right_arrow_bold' ) {
1141
+ iconNextClass = 'fa fa-arrow-down';
1142
+ }
1143
+ if( iconNext === 'right_arrow_long' ) {
1144
+ iconNextClass = 'fa fa-long-arrow-down';
1145
+ }
1146
+ if( iconNext === 'right_arrow_long_circle' ) {
1147
+ iconNextClass = 'fa fa-arrow-circle-down';
1148
+ }
1149
+ if( iconNext === 'right_arrow_angle' ) {
1150
+ iconNextClass = 'fa fa-angle-down';
1151
+ }
1152
+ if( iconNext === 'right_arrow_chevron' ) {
1153
+ iconNextClass = 'fa fa-chevron-down';
1154
+ }
1155
+
1156
+ var iconPrev = settings.premium_carousel_arrow_icon_prev_ver;
1157
+
1158
+ if( iconPrev === 'left_arrow_bold' ) {
1159
+ iconPrevClass = 'fa fa-arrow-up';
1160
+ }
1161
+ if( iconPrev === 'left_arrow_long' ) {
1162
+ iconPrevClass = 'fa fa-long-arrow-up';
1163
+ }
1164
+ if( iconPrev === 'left_arrow_long_circle' ) {
1165
+ iconPrevClass = 'fa fa-arrow-circle-up';
1166
+ }
1167
+ if( iconPrev === 'left_arrow_angle' ) {
1168
+ iconPrevClass = 'fa fa-angle-up';
1169
+ }
1170
+ if( iconPrev === 'left_arrow_chevron' ) {
1171
+ iconPrevClass = 'fa fa-chevron-up';
1172
+ }
1173
+
1174
+ } else {
1175
+ var iconNext = settings.premium_carousel_arrow_icon_next;
1176
+
1177
+ if( iconNext === 'right_arrow_bold' ) {
1178
+ iconNextClass = 'fa fa-arrow-right';
1179
+ }
1180
+ if( iconNext === 'right_arrow_long' ) {
1181
+ iconNextClass = 'fa fa-long-arrow-right';
1182
+ }
1183
+ if( iconNext === 'right_arrow_long_circle' ) {
1184
+ iconNextClass = 'fa fa-arrow-circle-right';
1185
+ }
1186
+ if( iconNext === 'right_arrow_angle' ) {
1187
+ iconNextClass = 'fa fa-angle-right';
1188
+ }
1189
+ if( iconNext === 'right_arrow_chevron' ) {
1190
+ iconNextClass = 'fa fa-chevron-right';
1191
+ }
1192
+
1193
+ var iconPrev = settings.premium_carousel_arrow_icon_prev;
1194
+
1195
+ if( iconPrev === 'left_arrow_bold' ) {
1196
+ iconPrevClass = 'fa fa-arrow-left';
1197
+ }
1198
+ if( iconPrev === 'left_arrow_long' ) {
1199
+ iconPrevClass = 'fa fa-long-arrow-left';
1200
+ }
1201
+ if( iconPrev === 'left_arrow_long_circle' ) {
1202
+ iconPrevClass = 'fa fa-arrow-circle-left';
1203
+ }
1204
+ if( iconPrev === 'left_arrow_angle' ) {
1205
+ iconPrevClass = 'fa fa-angle-left';
1206
+ }
1207
+ if( iconPrev === 'left_arrow_chevron' ) {
1208
+ iconPrevClass = 'fa fa-chevron-left';
1209
+ }
1210
+ }
1211
+
1212
+
1213
+ var next_arrow = '<a type="button" data-role="none" class="'+ verticalAlignment +' carousel-next' + arrowClass + '" aria-label="Next" role="button" style=""><i class="' + iconNextClass + '" aria-hidden="true"></i></a>';
1214
+
1215
+ var left_arrow = '<a type="button" data-role="none" class="'+ verticalAlignment +' carousel-prev' + arrowClass + '" aria-label="Next" role="button" style=""><i class="' + iconPrevClass + '" aria-hidden="true"></i></a>';
1216
+
1217
+ var nextArrow = next_arrow,
1218
+ prevArrow = left_arrow;
1219
+
1220
+ } else {
1221
+ var arrows = false,
1222
+ nextArrow = '',
1223
+ prevArrow = '';
1224
+ }
1225
+
1226
+ if( 'yes' === settings.premium_carousel_dot_navigation_show ) {
1227
+
1228
+ var dots = true;
1229
+
1230
+ if( 'square_white' === settings.premium_carousel_dot_icon ) {
1231
+ dotIcon = 'fa fa-square-o';
1232
+ }
1233
+ if( 'square_black' === settings.premium_carousel_dot_icon ) {
1234
+ dotIcon = 'fa fa-square';
1235
+ }
1236
+ if( 'circle_white' === settings.premium_carousel_dot_icon ) {
1237
+ dotIcon = 'fa fa-circle';
1238
+ }
1239
+ if( 'circle_thin' === settings.premium_carousel_dot_icon ) {
1240
+ dotIcon = 'fa fa-circle-thin';
1241
+ }
1242
+ if( 'circle_thin_bold' === settings.premium_carousel_dot_icon ) {
1243
+ dotIcon = 'fa fa-circle-o';
1244
+ }
1245
+ var customPaging = dotIcon;
1246
+
1247
+ } else {
1248
+
1249
+ var dots = false,
1250
+ dotIcon = '',
1251
+ customPaging = '';
1252
+
1253
+ }
1254
+ var extraClass = '' !== settings.premium_carousel_extra_class ? ' ' + settings.premium_carousel_extra_class : '';
1255
+
1256
+ var animationClass = settings.premium_carousel_animation_list;
1257
+ var animation = '' !== animationClass ? 'animated ' + animationClass : 'null';
1258
+
1259
+ var dotAnim = settings.premium_carousel_navigation_effect === 'yes' ? 'hvr-ripple-out' : '';
1260
+
1261
+ var tabletBreakpoint = '' !== settings.premium_carousel_tablet_breakpoint ? settings.premium_carousel_tablet_breakpoint : 1025;
1262
+
1263
+ var mobileBreakpoint = '' !== settings.premium_carousel_mobile_breakpoint ? settings.premium_carousel_mobile_breakpoint : 768;
1264
+
1265
+ var carouselSettings = {};
1266
+
1267
+ carouselSettings.vertical = vertical;
1268
+ carouselSettings.slidesToScroll = slidesToScroll;
1269
+ carouselSettings.slidesToShow = slidesToShow;
1270
+ carouselSettings.infinite = infinite;
1271
+ carouselSettings.speed = speed;
1272
+ carouselSettings.fade = fade;
1273
+ carouselSettings.autoplay = autoplay;
1274
+ carouselSettings.autoplaySpeed = autoplaySpeed;
1275
+ carouselSettings.draggable = draggable;
1276
+ carouselSettings.touchMove = touchMove;
1277
+ carouselSettings.rtl = rtl;
1278
+ carouselSettings.adaptiveHeight = adaptiveHeight;
1279
+ carouselSettings.pauseOnHover = pauseOnHover;
1280
+ carouselSettings.centerMode = centerMode;
1281
+ carouselSettings.centerPadding = centerPadding;
1282
+ carouselSettings.arrows = arrows;
1283
+ carouselSettings.nextArrow = nextArrow;
1284
+ carouselSettings.prevArrow = prevArrow;
1285
+ carouselSettings.dots = dots;
1286
+ carouselSettings.customPaging = customPaging;
1287
+ carouselSettings.slidesDesk = slidesOnDesk;
1288
+ carouselSettings.slidesTab = slidesOnTabs;
1289
+ carouselSettings.slidesMob = slidesOnMob;
1290
+ carouselSettings.animation = animation;
1291
+ carouselSettings.tabletBreak = tabletBreakpoint;
1292
+ carouselSettings.mobileBreak = mobileBreakpoint;
1293
+
1294
+ var templates = [];
1295
+
1296
+ if( 'select' === settings.premium_carousel_content_type ) {
1297
+
1298
+ templates = settings.premium_carousel_slider_content;
1299
+
1300
+ } else {
1301
+
1302
+ _.each( settings.premium_carousel_templates_repeater, function( template ) {
1303
+
1304
+ templates.push( template.premium_carousel_repeater_item );
1305
+
1306
+ } );
1307
+
1308
+ }
1309
+
1310
+ view.addRenderAttribute( 'carousel', 'id', 'premium-carousel-wrapper-' + view.getID() );
1311
+
1312
+ view.addRenderAttribute( 'carousel', 'class', [
1313
+ 'premium-carousel-wrapper',
1314
+ dotAnim,
1315
+ 'carousel-wrapper-' + view.getID(),
1316
+ extraClass,
1317
+ dir
1318
+ ] );
1319
+
1320
+ if( 'yes' === settings.premium_carousel_dot_navigation_show ) {
1321
+ view.addRenderAttribute( 'carousel', 'class', 'premium-carousel-dots-' + settings.premium_carousel_dot_position );
1322
+ }
1323
+
1324
+ if( 'yes' === settings.premium_carousel_fade && 'yes' === settings.premium_carousel_zoom ) {
1325
+ view.addRenderAttribute( 'carousel', 'class', 'premium-carousel-scale' );
1326
+ }
1327
+
1328
+ view.addRenderAttribute( 'carousel', 'data-settings', JSON.stringify( carouselSettings ) );
1329
+
1330
+ view.addRenderAttribute( 'carousel-inner', 'id', 'premium-carousel-' + view.getID() );
1331
+ view.addRenderAttribute( 'carousel-inner', 'class', 'premium-carousel-inner' );
1332
+
1333
+
1334
+ #>
1335
+
1336
+ <div {{{ view.getRenderAttributeString('carousel') }}}>
1337
+ <div {{{ view.getRenderAttributeString('carousel-inner') }}}>
1338
+ <# _.each( templates, function( templateID ) { #>
1339
+ <div class="item-wrapper" data-template="{{templateID}}"></div>
1340
+ <# } ); #>
1341
+ </div>
1342
+ </div>
1343
+
1344
+
1345
+ <?php
1346
+
1347
+ }
1348
  }
widgets/premium-vscroll.php CHANGED
@@ -773,7 +773,7 @@ class Premium_Vscroll extends Widget_Base {
773
  <div <?php echo $this->get_render_attribute_string('section_' . $index); ?>>
774
  <?php
775
  $template_id = $section['section_template'];
776
- echo $this->get_template_content($template_id);
777
  ?>
778
  </div>
779
  <?php endforeach; ?>
773
  <div <?php echo $this->get_render_attribute_string('section_' . $index); ?>>
774
  <?php
775
  $template_id = $section['section_template'];
776
+ echo $this->get_template_content( $template_id );
777
  ?>
778
  </div>
779
  <?php endforeach; ?>