Premium Addons for Elementor - Version 2.7.0

Version Description

  • Fixed: 'Undefined variable: $image_src' in Premium Testimonials widget.
Download this release

Release Info

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

Code changes from version 2.6.9 to 2.7.0

admin/includes/notices.php CHANGED
@@ -23,8 +23,9 @@ class Premium_Admin_Notices {
23
  * init required functions
24
  */
25
  public function init(){
26
- $this->handle_get_pro_notice();
27
- $this->handle_review_notice();
 
28
  }
29
 
30
  /**
@@ -32,8 +33,9 @@ class Premium_Admin_Notices {
32
  */
33
  public function check_admin_notices() {
34
  $this->required_plugins_check();
35
- $this->get_review_notice();
36
- $this->get_pro_notice();
 
37
  }
38
 
39
  /**
@@ -79,6 +81,26 @@ class Premium_Admin_Notices {
79
  exit;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  /**
83
  * Shows an admin notice when Elementor is missing.
84
  * @since 1.0.0
@@ -119,7 +141,7 @@ class Premium_Admin_Notices {
119
  /**
120
  * Checks if review admin notice is dismissed
121
  * @since 2.6.8
122
- * @return boolean
123
  */
124
  public function get_review_notice() {
125
 
@@ -145,9 +167,9 @@ class Premium_Admin_Notices {
145
  /**
146
  * Shows an admin notice when Elementor is missing.
147
  * @since 2.6.8
148
- * @return boolean
149
  */
150
- public function get_pro_notice(){
151
 
152
  $pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
153
 
@@ -174,6 +196,34 @@ class Premium_Admin_Notices {
174
 
175
  }
176
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
  /**
179
  * Returns the active theme slug
23
  * init required functions
24
  */
25
  public function init(){
26
+ // $this->handle_get_pro_notice();
27
+ // $this->handle_review_notice();
28
+ $this->handle_multi_scroll_notice();
29
  }
30
 
31
  /**
33
  */
34
  public function check_admin_notices() {
35
  $this->required_plugins_check();
36
+ // $this->get_review_notice();
37
+ // $this->get_pro_notice();
38
+ $this->get_multi_scroll_notice();
39
  }
40
 
41
  /**
81
  exit;
82
  }
83
 
84
+ /**
85
+ * Checks if multiscroll message is dismissed.
86
+ * @access public
87
+ * @return void
88
+ */
89
+ public function handle_multi_scroll_notice() {
90
+ if ( ! isset( $_GET['pro_scroll'] ) ) {
91
+ return;
92
+ }
93
+
94
+ if ( 'opt_out' === $_GET['pro_scroll'] ) {
95
+ check_admin_referer( 'opt_out' );
96
+
97
+ update_option( 'pro_scroll_notice', '1' );
98
+ }
99
+
100
+ wp_redirect( remove_query_arg( 'pro_scroll' ) );
101
+ exit;
102
+ }
103
+
104
  /**
105
  * Shows an admin notice when Elementor is missing.
106
  * @since 1.0.0
141
  /**
142
  * Checks if review admin notice is dismissed
143
  * @since 2.6.8
144
+ * @return void
145
  */
146
  public function get_review_notice() {
147
 
167
  /**
168
  * Shows an admin notice when Elementor is missing.
169
  * @since 2.6.8
170
+ * @return void
171
  */
172
+ public function get_pro_notice() {
173
 
174
  $pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
175
 
196
 
197
  }
198
  }
199
+
200
+ /**
201
+ * Shows an admin notice for multiscroll.
202
+ * @since 2.7.0
203
+ * @return void
204
+ */
205
+ public function get_multi_scroll_notice() {
206
+
207
+ $scroll_notice = get_option( 'pro_scroll_notice' );
208
+
209
+ $theme = self::get_installed_theme();
210
+
211
+ $notice_url = sprintf( 'https://premiumaddons.com/multi-scroll-widget-for-elementor-page-builder?utm_source=multiscroll-notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
212
+
213
+ if ( '1' === $scroll_notice ) {
214
+ return;
215
+ } else if ( '1' !== $scroll_notice ) {
216
+ $optout_url = wp_nonce_url( add_query_arg( 'pro_scroll', 'opt_out' ), 'opt_out' );
217
+
218
+ $scroll_message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><span>NEW!&nbsp</span><strong><span>Multi-Scroll Widget for Elementor&nbsp</strong>is Now Available in Premium Addons PRO.&nbsp</span><a href="%s" target="_blank" style="flex-grow: 2;"> Check it out now.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png', $notice_url );
219
+
220
+ }
221
+
222
+ $scroll_message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
223
+
224
+ $this->render_admin_notices( $scroll_message );
225
+
226
+ }
227
 
228
  /**
229
  * Returns the active theme slug
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 2.6.6</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 2.6.9</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
@@ -372,16 +372,19 @@
372
  };
373
  //Premium Modal Box Handler
374
  var PremiumModalBoxHandler = function ($scope,$){
375
- var modalBoxElement = $scope.find('.premium-modal-box-container');
376
- var modalBoxSettings = modalBoxElement.data('settings');
377
- if(modalBoxSettings['trigger'] === 'pageload'){
378
- $(document).ready(function($){
 
 
379
  setTimeout( function(){
380
  modalBoxElement.find('.premium-modal-box-modal').modal();
381
  }, modalBoxSettings['delay'] * 1000);
382
  });
383
  }
384
- };
 
385
  //Premium Blog Handler
386
  var PremiumBlogHandler = function ($scope,$){
387
  var blogElement = $scope.find('.premium-blog-wrap'),
372
  };
373
  //Premium Modal Box Handler
374
  var PremiumModalBoxHandler = function ($scope,$){
375
+ var modalBoxElement = $scope.find('.premium-modal-box-container'),
376
+ modalBoxSettings = modalBoxElement.data('settings');
377
+
378
+ if(modalBoxElement.length > 0) {
379
+ if(modalBoxSettings['trigger'] === 'pageload'){
380
+ $(document).ready(function($){
381
  setTimeout( function(){
382
  modalBoxElement.find('.premium-modal-box-modal').modal();
383
  }, modalBoxSettings['delay'] * 1000);
384
  });
385
  }
386
+ }
387
+ };
388
  //Premium Blog Handler
389
  var PremiumBlogHandler = function ($scope,$){
390
  var blogElement = $scope.find('.premium-blog-wrap'),
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 2.6.9
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -22,12 +22,12 @@ if (! function_exists('add_action')) {
22
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
23
 
24
 
25
- define('PREMIUM_ADDONS_VERSION', '2.6.9');
26
  define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
27
  define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
28
  define('PREMIUM_ADDONS_FILE', __FILE__);
29
  define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
- define('PREMIUM_ADDONS_STABLE_VERSION', '2.6.6');
31
 
32
  if( ! class_exists('Premium_Addons_Elementor') ) {
33
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 2.7.0
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
22
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
23
 
24
 
25
+ define('PREMIUM_ADDONS_VERSION', '2.7.0');
26
  define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
27
  define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
28
  define('PREMIUM_ADDONS_FILE', __FILE__);
29
  define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
+ define('PREMIUM_ADDONS_STABLE_VERSION', '2.6.9');
31
 
32
  if( ! class_exists('Premium_Addons_Elementor') ) {
33
  /*
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 4.9.8
7
  Requires PHP: 5.4
8
- Stable tag: 2.6.9
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -73,14 +73,15 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
73
  16. [Premium Instagram Feed](https://premiumaddons.com/instagram-feed-widget-for-elementor-page-builder/)
74
  17. [Premium Ken Burns](https://premiumaddons.com/ken-burns-section-addon-for-elementor-page-builder/)
75
  18. [Premium Magic Section](https://premiumaddons.com/magic-section-widget-for-elementor-page-builder/)
76
- 19. [Premium Parallax](https://premiumaddons.com/parallax-section-addon-for-elementor-page-builder/)
77
- 20. [Premium Particles](https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/)
78
- 21. [Premium Preview Window](https://premiumaddons.com/preview-window-widget-for-elementor-page-builder/)
79
- 22. [Premium Tables](https://premiumaddons.com/table-widget-for-elementor-page-builder/)
80
- 23. [Premium Twitter Feed](https://premiumaddons.com/twitter-feed-widget-for-elementor-page-builder/)
81
- 24. [Premium Tabs](https://premiumaddons.com/tabs-widget-for-elementor-page-builder-2/)
82
- 25. [Premium Unfold](https://premiumaddons.com/unfold-widget-for-elementor-page-builder/)
83
- 26. [Premium Whatsapp Chat](https://premiumaddons.com/whatsapp-widget-for-elementor-page-builder/)
 
84
 
85
 
86
  == Installation ==
@@ -134,6 +135,10 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
134
 
135
  == Changelog ==
136
 
 
 
 
 
137
  = 2.6.9 =
138
 
139
  - Fixed: Scrollbar issue in Premium Modal Box widget.
@@ -541,4 +546,4 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
541
 
542
  = 1.0 =
543
 
544
- - Initial stable release.
5
  Requires at least: 4.5
6
  Tested up to: 4.9.8
7
  Requires PHP: 5.4
8
+ Stable tag: 2.7.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
73
  16. [Premium Instagram Feed](https://premiumaddons.com/instagram-feed-widget-for-elementor-page-builder/)
74
  17. [Premium Ken Burns](https://premiumaddons.com/ken-burns-section-addon-for-elementor-page-builder/)
75
  18. [Premium Magic Section](https://premiumaddons.com/magic-section-widget-for-elementor-page-builder/)
76
+ 19. [Premium Multi Scroll](https://premiumaddons.com/multi-scroll-widget-for-elementor-page-builder/)
77
+ 20. [Premium Parallax](https://premiumaddons.com/parallax-section-addon-for-elementor-page-builder/)
78
+ 21. [Premium Particles](https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/)
79
+ 22. [Premium Preview Window](https://premiumaddons.com/preview-window-widget-for-elementor-page-builder/)
80
+ 23. [Premium Tables](https://premiumaddons.com/table-widget-for-elementor-page-builder/)
81
+ 24. [Premium Twitter Feed](https://premiumaddons.com/twitter-feed-widget-for-elementor-page-builder/)
82
+ 25. [Premium Tabs](https://premiumaddons.com/tabs-widget-for-elementor-page-builder-2/)
83
+ 26. [Premium Unfold](https://premiumaddons.com/unfold-widget-for-elementor-page-builder/)
84
+ 27. [Premium Whatsapp Chat](https://premiumaddons.com/whatsapp-widget-for-elementor-page-builder/)
85
 
86
 
87
  == Installation ==
135
 
136
  == Changelog ==
137
 
138
+ = 2.7.0 =
139
+
140
+ - Fixed: 'Undefined variable: $image_src' in Premium Testimonials widget.
141
+
142
  = 2.6.9 =
143
 
144
  - Fixed: Scrollbar issue in Premium Modal Box widget.
546
 
547
  = 1.0 =
548
 
549
+ - Initial stable release.
widgets/premium-testimonials.php CHANGED
@@ -497,7 +497,7 @@ class Premium_Testimonials extends Widget_Base {
497
  $person_title_tag = $settings['premium_testimonial_person_name_size'];
498
 
499
  $company_title_tag = $settings['premium_testimonial_company_name_size'];
500
-
501
  if(!empty($settings['premium_testimonial_person_image']['url'])) {
502
  $image_src = $settings['premium_testimonial_person_image']['url'];
503
  }
@@ -508,18 +508,20 @@ class Premium_Testimonials extends Widget_Base {
508
  <div class="premium-testimonial-container">
509
  <i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
510
  <div class="premium-testimonial-content-wrapper">
511
- <div class="premium-testimonial-img-wrapper" style="border-radius: <?php
512
- if( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
513
- elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
514
- elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
515
- endif;?>">
516
- <img src="<?php echo $image_src; ?>" alt="premium-image" class="premium-testimonial-person-image"
517
- style="border-radius: <?php
518
- if ( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
519
  elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
520
  elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
521
- endif; ?>">
522
- </div>
 
 
 
 
 
 
 
523
 
524
  <div class="premium-testimonial-text-wrapper">
525
  <div <?php echo $this->get_render_attribute_string('premium_testimonial_content'); ?>><?php echo $settings['premium_testimonial_content']; ?></div>
@@ -549,6 +551,7 @@ class Premium_Testimonials extends Widget_Base {
549
 
550
  var personTag = settings.premium_testimonial_person_name_size,
551
  companyTag = settings.premium_testimonial_company_name_size,
 
552
  imageSrc,
553
  borderRadius;
554
 
@@ -572,10 +575,11 @@ class Premium_Testimonials extends Widget_Base {
572
  <div class="premium-testimonial-container">
573
  <i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
574
  <div class="premium-testimonial-content-wrapper">
575
- <div class="premium-testimonial-img-wrapper" style="border-radius: {{ borderRadius }}">
576
- <img src="{{ imageSrc }}" alt="premium-image" class="premium-testimonial-person-image" style="border-radius: {{ borderRadius }}">
577
- </div>
578
-
 
579
  <div class="premium-testimonial-text-wrapper">
580
  <div {{{ view.getRenderAttributeString('premium_testimonial_content') }}}>{{{ settings.premium_testimonial_content }}}</div>
581
  </div>
497
  $person_title_tag = $settings['premium_testimonial_person_name_size'];
498
 
499
  $company_title_tag = $settings['premium_testimonial_company_name_size'];
500
+ $image_src = '';
501
  if(!empty($settings['premium_testimonial_person_image']['url'])) {
502
  $image_src = $settings['premium_testimonial_person_image']['url'];
503
  }
508
  <div class="premium-testimonial-container">
509
  <i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
510
  <div class="premium-testimonial-content-wrapper">
511
+ <?php if ( ! empty( $image_src ) ) : ?>
512
+ <div class="premium-testimonial-img-wrapper" style="border-radius: <?php
513
+ if( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
 
 
 
 
 
514
  elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
515
  elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
516
+ endif;?>">
517
+ <img src="<?php echo $image_src; ?>" alt="premium-image" class="premium-testimonial-person-image"
518
+ style="border-radius: <?php
519
+ if ( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
520
+ elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
521
+ elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
522
+ endif; ?>">
523
+ </div>
524
+ <?php endif; ?>
525
 
526
  <div class="premium-testimonial-text-wrapper">
527
  <div <?php echo $this->get_render_attribute_string('premium_testimonial_content'); ?>><?php echo $settings['premium_testimonial_content']; ?></div>
551
 
552
  var personTag = settings.premium_testimonial_person_name_size,
553
  companyTag = settings.premium_testimonial_company_name_size,
554
+ imageSrc = '',
555
  imageSrc,
556
  borderRadius;
557
 
575
  <div class="premium-testimonial-container">
576
  <i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
577
  <div class="premium-testimonial-content-wrapper">
578
+ <# if ( '' != imageSrc ) { #>
579
+ <div class="premium-testimonial-img-wrapper" style="border-radius: {{ borderRadius }}">
580
+ <img src="{{ imageSrc }}" alt="premium-image" class="premium-testimonial-person-image" style="border-radius: {{ borderRadius }}">
581
+ </div>
582
+ <# } #>
583
  <div class="premium-testimonial-text-wrapper">
584
  <div {{{ view.getRenderAttributeString('premium_testimonial_content') }}}>{{{ settings.premium_testimonial_content }}}</div>
585
  </div>