Premium Addons for Elementor - Version 2.8.3

Version Description

  • Tweak: Added speed option in Premium Progress Bar widget.
  • Tweak: Set center location to visitor's location option added to Premium Maps widget.
Download this release

Release Info

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

Code changes from version 2.8.2 to 2.8.3

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.8.1</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.8.2</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
@@ -3,11 +3,11 @@
3
  var PremiumProgressBarWidgetHandler = function ($scope,$){
4
  var progressbarElement = $scope.find('.premium-progressbar-progress-bar').each(function(){
5
 
6
- var settings = $(this).data('settings');
 
 
7
 
8
- var length = settings['progress_length'];
9
-
10
- $(this).animate({width: length + '%'} , length * 25);
11
  });
12
  };
13
  //Premium Progress Bar on Scroll Handler
3
  var PremiumProgressBarWidgetHandler = function ($scope,$){
4
  var progressbarElement = $scope.find('.premium-progressbar-progress-bar').each(function(){
5
 
6
+ var settings = $(this).data('settings'),
7
+ length = settings['progress_length'],
8
+ speed = settings['speed'];
9
 
10
+ $(this).animate({width: length + '%'} , speed);
 
 
11
  });
12
  };
13
  //Premium Progress Bar on Scroll Handler
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 2.8.2
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.8.2');
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.8.1');
31
 
32
  if( ! class_exists('Premium_Addons_Elementor') ) {
33
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 2.8.3
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.8.3');
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.8.2');
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.8.2
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -137,6 +137,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
140
  = 2.8.2 =
141
 
142
  - Fixed: Navigation arrows issue in Premium Carousel widget.
5
  Requires at least: 4.5
6
  Tested up to: 4.9.8
7
  Requires PHP: 5.4
8
+ Stable tag: 2.8.3
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
137
 
138
  == Changelog ==
139
 
140
+ = 2.8.3 =
141
+
142
+ - Tweak: Added speed option in Premium Progress Bar widget.
143
+ - Tweak: Set center location to visitor's location option added to Premium Maps widget.
144
+
145
  = 2.8.2 =
146
 
147
  - Fixed: Navigation arrows issue in Premium Carousel widget.
widgets/premium-maps.php CHANGED
@@ -54,10 +54,22 @@ class Premium_Maps extends Widget_Base {
54
  );
55
  }
56
 
 
 
 
 
 
 
 
 
 
57
  $this->add_control('premium_map_location_finder',
58
  [
59
  'label' => esc_html__( 'Latitude & Longitude Finder', 'premium-addons-for-elementor' ),
60
  'type' => Controls_Manager::SWITCHER,
 
 
 
61
  ]
62
  );
63
 
@@ -68,7 +80,8 @@ class Premium_Maps extends Widget_Base {
68
  'raw' => '<form onsubmit="getAddress(this);" action="javascript:void(0);"><input type="text" id="premium-map-get-address" class="premium-map-get-address" style="margin-top:10px; margin-bottom:10px;"><input type="submit" value="Search" class="elementor-button elementor-button-default" onclick="getAddress(this)"></form><div class="premium-address-result" style="margin-top:10px; line-height: 1.3; font-size: 12px;"></div>',
69
  'label_block' => true,
70
  'condition' => [
71
- 'premium_map_location_finder' => 'yes'
 
72
  ]
73
  ]
74
  );
@@ -81,6 +94,9 @@ class Premium_Maps extends Widget_Base {
81
  'description' => esc_html__('Center latitude and longitude are required to identify your location', 'premium-addons-for-elementor'),
82
  'default' => '18.591212',
83
  'label_block' => true,
 
 
 
84
  ]
85
  );
86
 
@@ -91,6 +107,9 @@ class Premium_Maps extends Widget_Base {
91
  'description' => esc_html__('Center latitude and longitude are required to identify your location', 'premium-addons-for-elementor'),
92
  'default' => '73.741261',
93
  'label_block' => true,
 
 
 
94
  ]
95
  );
96
 
@@ -573,77 +592,55 @@ class Premium_Maps extends Widget_Base {
573
 
574
  $map_pins = $settings['premium_maps_map_pins'];
575
 
576
- if( !empty( $settings['premium_maps_custom_styling'] ) ){
577
- $map_custom_style = $settings['premium_maps_custom_styling'];
578
- } else {
579
- $map_custom_style = '';
580
- }
581
 
582
- if ($settings['premium_maps_map_option_streeview'] == 'yes') {
583
- $street_view = 'true';
584
- } else {
585
- $street_view = 'false';
586
- }
587
-
588
- if ($settings['premium_maps_map_option_mapscroll'] == 'yes') {
589
- $scroll_wheel = 'true';
590
- } else {
591
- $scroll_wheel = 'false';
592
- }
593
-
594
- if ($settings['premium_maps_map_option_fullscreen_control'] == 'yes') {
595
- $enable_full_screen = 'true';
596
- } else {
597
- $enable_full_screen = 'false';
598
- }
599
 
600
- if ($settings['premium_maps_map_option_zoom_controls'] == 'yes') {
601
- $enable_zoom_control = 'true';
602
- } else {
603
- $enable_zoom_control = 'false';
604
- }
605
 
606
- if ($settings['premium_maps_map_option_map_type_control'] == 'yes') {
607
- $map_type_control = 'true';
608
- } else {
609
- $map_type_control = 'false';
610
- }
611
 
612
- if ($settings['premium_maps_marker_open'] == 'yes') {
613
- $automatic_open = 'true';
614
- } else {
615
- $automatic_open = 'false';
616
- }
617
 
618
- if ($settings['premium_maps_marker_hover_open'] == 'yes') {
619
- $hover_open = 'true';
620
- } else {
621
- $hover_open = 'false';
622
- }
623
 
624
- if ($settings['premium_maps_marker_mouse_out'] == 'yes') {
625
- $hover_close = 'true';
626
- } else {
627
- $hover_close = 'false';
628
- }
629
-
630
- if($settings['premium_maps_map_option_cluster'] == 'yes') {
631
- $marker_cluster = 'true';
632
- } else {
633
- $marker_cluster = 'false';
634
- }
635
 
 
 
636
  $centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
 
637
  $centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
638
 
639
  $marker_width = !empty($settings['premium_maps_markers_width']) ? $settings['premium_maps_markers_width'] : 1000;
640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
641
  $map_settings = [
642
  'zoom' => $settings['premium_maps_map_zoom']['size'],
643
  'maptype' => $settings['premium_maps_map_type'],
644
  'streetViewControl' => $street_view,
645
  'centerlat' => $centerlat,
646
- 'centerlong' => $centerlong,
647
  'scrollwheel' => $scroll_wheel,
648
  'fullScreen' => $enable_full_screen,
649
  'zoomControl' => $enable_zoom_control,
@@ -655,19 +652,17 @@ class Premium_Maps extends Widget_Base {
655
  ];
656
 
657
  $this->add_render_attribute('style_wrapper', 'data-style', $settings['premium_maps_custom_styling']);
658
- ?>
659
 
660
- <div class="premium-maps-container" id="premium-maps-container">
661
- <?php if(count($map_pins)){
662
- ?>
663
- <div class="premium_maps_map_height" data-settings='<?php echo wp_json_encode($map_settings); ?>' <?php echo $this->get_render_attribute_string('style_wrapper'); ?>>
664
  <?php
665
- foreach($map_pins as $pin){
666
  ?>
667
  <div class="premium-pin" data-lng="<?php echo $pin['map_longitude']; ?>" data-lat="<?php echo $pin['map_latitude']; ?>" data-icon="<?php echo $pin['pin_icon']['url']; ?>" data-max-width="<?php echo $marker_width; ?>">
668
- <?php if(!empty($pin['pin_title'])|| !empty($pin['pin_desc'])):?>
669
-
670
- <div class='premium-maps-info-container'><p class='premium-maps-info-title'><?php echo $pin['pin_title']; ?></p><div class='premium-maps-info-desc'><?php echo $pin['pin_desc']; ?></div></div>
671
  <?php endif; ?>
672
  </div>
673
  <?php
@@ -676,9 +671,7 @@ class Premium_Maps extends Widget_Base {
676
  </div>
677
  <?php
678
  } ?>
679
-
680
- </div>
681
-
682
  <?php
683
  }
684
  }
54
  );
55
  }
56
 
57
+ $this->add_control('premium_map_ip_location',
58
+ [
59
+ 'label' => esc_html__( 'Get User Location', 'premium-addons-for-elementor' ),
60
+ 'type' => Controls_Manager::SWITCHER,
61
+ 'description' => esc_html__('Get center location from visitor\'s location','premium-addons-for-elementor' ),
62
+ 'return_value' => 'true'
63
+ ]
64
+ );
65
+
66
  $this->add_control('premium_map_location_finder',
67
  [
68
  'label' => esc_html__( 'Latitude & Longitude Finder', 'premium-addons-for-elementor' ),
69
  'type' => Controls_Manager::SWITCHER,
70
+ 'condition' => [
71
+ 'premium_map_ip_location!' => 'true'
72
+ ]
73
  ]
74
  );
75
 
80
  'raw' => '<form onsubmit="getAddress(this);" action="javascript:void(0);"><input type="text" id="premium-map-get-address" class="premium-map-get-address" style="margin-top:10px; margin-bottom:10px;"><input type="submit" value="Search" class="elementor-button elementor-button-default" onclick="getAddress(this)"></form><div class="premium-address-result" style="margin-top:10px; line-height: 1.3; font-size: 12px;"></div>',
81
  'label_block' => true,
82
  'condition' => [
83
+ 'premium_map_location_finder' => 'yes',
84
+ 'premium_map_ip_location!' => 'true'
85
  ]
86
  ]
87
  );
94
  'description' => esc_html__('Center latitude and longitude are required to identify your location', 'premium-addons-for-elementor'),
95
  'default' => '18.591212',
96
  'label_block' => true,
97
+ 'condition' => [
98
+ 'premium_map_ip_location!' => 'true'
99
+ ]
100
  ]
101
  );
102
 
107
  'description' => esc_html__('Center latitude and longitude are required to identify your location', 'premium-addons-for-elementor'),
108
  'default' => '73.741261',
109
  'label_block' => true,
110
+ 'condition' => [
111
+ 'premium_map_ip_location!' => 'true'
112
+ ]
113
  ]
114
  );
115
 
592
 
593
  $map_pins = $settings['premium_maps_map_pins'];
594
 
595
+ $street_view = 'yes' == $settings['premium_maps_map_option_streeview'] ? 'true' : 'false';
 
 
 
 
596
 
597
+ $scroll_wheel = 'yes' == $settings['premium_maps_map_option_mapscroll'] ? 'true' : 'false';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
 
599
+ $enable_full_screen = 'yes' == $settings['premium_maps_map_option_fullscreen_control'] ? 'true' : 'false';
 
 
 
 
600
 
601
+ $enable_zoom_control = 'yes' == $settings['premium_maps_map_option_zoom_controls'] ? 'true' : 'false';
 
 
 
 
602
 
603
+ $map_type_control = 'yes' == $settings['premium_maps_map_option_map_type_control'] ? 'true' : 'false';
 
 
 
 
604
 
605
+ $automatic_open = 'yes' == $settings['premium_maps_marker_open'] ? 'true' : 'false';
 
 
 
 
606
 
607
+ $hover_open = 'yes' == $settings['premium_maps_marker_hover_open'] ? 'true' : 'false';
608
+
609
+ $hover_close = 'yes' == $settings['premium_maps_marker_mouse_out'] ? 'true' : 'false';
 
 
 
 
 
 
 
 
610
 
611
+ $marker_cluster = 'yes' == $settings['premium_maps_map_option_cluster'] ? 'true' : 'false';
612
+
613
  $centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
614
+
615
  $centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
616
 
617
  $marker_width = !empty($settings['premium_maps_markers_width']) ? $settings['premium_maps_markers_width'] : 1000;
618
 
619
+ $get_ip_location = $settings['premium_map_ip_location'];
620
+
621
+ if( 'true' == $get_ip_location ) {
622
+
623
+ if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
624
+ $http_x_headers = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
625
+
626
+ $_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
627
+ }
628
+ $ipAddress = $_SERVER['REMOTE_ADDR'];
629
+
630
+ $env = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$ipAddress"));
631
+
632
+ $centerlat = isset( $env['geoplugin_latitude'] ) ? $env['geoplugin_latitude'] : $centerlat;
633
+
634
+ $centerlong = isset( $env['geoplugin_longitude'] ) ? $env['geoplugin_longitude'] : $centerlong;
635
+
636
+ }
637
+
638
  $map_settings = [
639
  'zoom' => $settings['premium_maps_map_zoom']['size'],
640
  'maptype' => $settings['premium_maps_map_type'],
641
  'streetViewControl' => $street_view,
642
  'centerlat' => $centerlat,
643
+ 'centerlong' => $centerlong,
644
  'scrollwheel' => $scroll_wheel,
645
  'fullScreen' => $enable_full_screen,
646
  'zoomControl' => $enable_zoom_control,
652
  ];
653
 
654
  $this->add_render_attribute('style_wrapper', 'data-style', $settings['premium_maps_custom_styling']);
655
+ ?>
656
 
657
+ <div class="premium-maps-container" id="premium-maps-container">
658
+ <?php if( count( $map_pins ) ) { ?>
659
+ <div class="premium_maps_map_height" data-settings='<?php echo wp_json_encode( $map_settings ); ?>' <?php echo $this->get_render_attribute_string('style_wrapper'); ?>>
 
660
  <?php
661
+ foreach( $map_pins as $pin ) {
662
  ?>
663
  <div class="premium-pin" data-lng="<?php echo $pin['map_longitude']; ?>" data-lat="<?php echo $pin['map_latitude']; ?>" data-icon="<?php echo $pin['pin_icon']['url']; ?>" data-max-width="<?php echo $marker_width; ?>">
664
+ <?php if( ! empty( $pin['pin_title'] )|| !empty( $pin['pin_desc'] ) ) : ?>
665
+ <div class='premium-maps-info-container'><p class='premium-maps-info-title'><?php echo $pin['pin_title']; ?></p><div class='premium-maps-info-desc'><?php echo $pin['pin_desc']; ?></div></div>
 
666
  <?php endif; ?>
667
  </div>
668
  <?php
671
  </div>
672
  <?php
673
  } ?>
674
+ </div>
 
 
675
  <?php
676
  }
677
  }
widgets/premium-progressbar.php CHANGED
@@ -192,6 +192,13 @@ class Premium_Progressbar extends Widget_Base {
192
  ]
193
  );
194
 
 
 
 
 
 
 
 
195
  /*Progress Bar Animated*/
196
  $this->add_control('premium_progressbar_progress_animation',
197
  [
@@ -575,7 +582,8 @@ class Premium_Progressbar extends Widget_Base {
575
  $this->add_inline_editing_attributes('premium_progressbar_right_label');
576
 
577
  $progressbar_settings = [
578
- 'progress_length' => $settings['premium_progressbar_progress_percentage']['size']
 
579
  ];
580
  ?>
581
 
192
  ]
193
  );
194
 
195
+ $this->add_control('premium_progressbar_speed',
196
+ [
197
+ 'label' => esc_html__('Speed (milliseconds)', 'premium-addons-for-elementor'),
198
+ 'type' => Controls_Manager::NUMBER
199
+ ]
200
+ );
201
+
202
  /*Progress Bar Animated*/
203
  $this->add_control('premium_progressbar_progress_animation',
204
  [
582
  $this->add_inline_editing_attributes('premium_progressbar_right_label');
583
 
584
  $progressbar_settings = [
585
+ 'progress_length' => $settings['premium_progressbar_progress_percentage']['size'],
586
+ 'speed' => !empty( $settings['premium_progressbar_speed'] ) ? $settings['premium_progressbar_speed'] : 1000
587
  ];
588
  ?>
589