Premium Addons for Elementor - Version 2.5.7

Version Description

  • Tweak: Added max width option for markers description box in Premium Maps widget.
  • Tweak: Added change default category name in Premium Grid widget.
Download this release

Release Info

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

Code changes from version 2.5.6 to 2.5.7

admin/settings/elements.php CHANGED
@@ -517,6 +517,17 @@ class PA_admin_settings {
517
518
</tr>
519
520
<tr>
521
<th><?php echo esc_html__('Premium Section Parallax', 'premium-addons-for-elementor'); ?></th>
522
<td>
517
518
</tr>
519
520
+ <tr>
521
+ <th><?php echo esc_html__('Premium Whatsapp Chat', 'premium-addons-for-elementor'); ?></th>
522
+ <td>
523
+ <label class="switch">
524
+ <input type="checkbox" id="premium-whatsapp-chat" name="premium-whatsapp-chat">
525
+ <span class="pro-slider round"></span>
526
+ </label>
527
+ </td>
528
+
529
+ </tr>
530
+
531
<tr>
532
<th><?php echo esc_html__('Premium Section Parallax', 'premium-addons-for-elementor'); ?></th>
533
<td>
admin/settings/version-control.php CHANGED
@@ -80,7 +80,7 @@ class PA_Version_Control {
80
<tr class="pa-roll-row">
81
<th>Rollback Version</th>
82
<td>
83
- <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.5.5</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
84
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
85
</td>
86
</tr>
80
<tr class="pa-roll-row">
81
<th>Rollback Version</th>
82
<td>
83
+ <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.5.6</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
84
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
85
</td>
86
</tr>
assets/js/premium-addons.js CHANGED
@@ -34,7 +34,7 @@
34
});
35
};
36
//Premium Grid Handler
37
- var PremiumGridWidgetHandler = function($scope,$){
38
if ($().isotope === undefined) {
39
return;
40
}
@@ -56,7 +56,10 @@
56
}
57
});
58
htmlContent.imagesLoaded(function () {
59
- htmlContent.isotope({layoutMode: 'masonry'});
60
});
61
} else if(isotopeOptions['img_size'] === 'one_size'){
62
34
});
35
};
36
//Premium Grid Handler
37
+ var PremiumGridWidgetHandler = function($scope,$){
38
if ($().isotope === undefined) {
39
return;
40
}
56
}
57
});
58
htmlContent.imagesLoaded(function () {
59
+ setTimeout(function(){
60
+ htmlContent.isotope({layoutMode: 'masonry'});
61
+ }, 1000);
62
+
63
});
64
} else if(isotopeOptions['img_size'] === 'one_size'){
65
assets/js/premium-maps.js CHANGED
@@ -54,9 +54,10 @@ jQuery(window).on('elementor/frontend/init',function(){
54
55
function add_marker( pin, map ,autoOpen, hoverOpen, hoverClose ) {
56
57
- var latlng = new google.maps.LatLng( pin.attr('data-lat'), pin.attr('data-lng') );
58
-
59
- icon_img = pin.attr('data-icon');
60
if(icon_img != ''){
61
var icon = {
62
url : pin.attr('data-icon')
@@ -81,6 +82,7 @@ jQuery(window).on('elementor/frontend/init',function(){
81
{
82
// create info window
83
var infowindow = new google.maps.InfoWindow({
84
content : pin.html()
85
});
86
if(autoOpen){
54
55
function add_marker( pin, map ,autoOpen, hoverOpen, hoverClose ) {
56
57
+ var latlng = new google.maps.LatLng( pin.attr('data-lat'), pin.attr('data-lng') ),
58
+ icon_img = pin.attr('data-icon'),
59
+ maxWidth = pin.attr('data-max-width');
60
+
61
if(icon_img != ''){
62
var icon = {
63
url : pin.attr('data-icon')
82
{
83
// create info window
84
var infowindow = new google.maps.InfoWindow({
85
+ maxWidth : maxWidth,
86
content : pin.html()
87
});
88
if(autoOpen){
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.5.6
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.5.6');
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.5.5');
31
32
/**
33
* Loading text domain, Including required files
@@ -107,6 +107,7 @@ class premium_Addon_Elementor {
107
*/
108
public function __construct() {
109
add_action('admin_init', array( $this, 'handle_get_pro_notice'));
110
add_action('admin_notices', array( $this, 'required_plugins_check' ));
111
add_action('admin_notices', array( $this, 'get_premium_pro_notice')) ;
112
add_action('elementor/init', array($this, 'initiate_elementor_addons'));
@@ -178,6 +179,23 @@ class premium_Addon_Elementor {
178
179
}
180
181
/**
182
* Shows a dismissible admin notice to get Premium PRO version
183
*/
@@ -185,20 +203,30 @@ class premium_Addon_Elementor {
185
186
$pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
187
188
if ( ! is_plugin_installed( $pro_path ) && current_user_can( 'install_plugins' ) ) {
189
190
- if ( '1' === get_option( 'get_pa_pro_notice' ) ) {
191
return;
192
}
193
194
- $optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro', 'opt_out' ), 'opt_out' );
195
-
196
- $theme = $this->get_installed_theme();
197
-
198
- $url = sprintf( 'https://premiumaddons.com/pro/?utm_source=notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
199
-
200
- $message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><strong>Premium Addons PRO&nbsp</strong><span> is now available!&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' ,$url );
201
-
202
$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 );
203
204
$this->render_admin_notices( $message );
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.5.7
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.5.7');
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.5.6');
31
32
/**
33
* Loading text domain, Including required files
107
*/
108
public function __construct() {
109
add_action('admin_init', array( $this, 'handle_get_pro_notice'));
110
+ add_action('admin_init', array( $this, 'handle_get_pro_sale_notice'));
111
add_action('admin_notices', array( $this, 'required_plugins_check' ));
112
add_action('admin_notices', array( $this, 'get_premium_pro_notice')) ;
113
add_action('elementor/init', array($this, 'initiate_elementor_addons'));
179
180
}
181
182
+ public function handle_get_pro_sale_notice(){
183
+
184
+ if ( ! isset( $_GET['get_pa_pro_sale'] ) ) {
185
+ return;
186
+ }
187
+
188
+ if ( 'opt_out' === $_GET['get_pa_pro_sale'] ) {
189
+ check_admin_referer( 'opt_out' );
190
+
191
+ update_option( 'get_pa_pro_sale_notice', '1' );
192
+ }
193
+
194
+ wp_redirect( remove_query_arg( 'get_pa_pro_sale' ) );
195
+ exit;
196
+
197
+ }
198
+
199
/**
200
* Shows a dismissible admin notice to get Premium PRO version
201
*/
203
204
$pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
205
206
+ $theme = $this->get_installed_theme();
207
+
208
+ $url = sprintf( 'https://premiumaddons.com/pro/?utm_source=notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
209
+
210
if ( ! is_plugin_installed( $pro_path ) && current_user_can( 'install_plugins' ) ) {
211
212
+ $get_pro = get_option( 'get_pa_pro_notice' );
213
+ $get_pro_sale = get_option( 'get_pa_pro_sale_notice' );
214
+ if ( '1' === $get_pro && '1' === $get_pro_sale ) {
215
return;
216
+ } else if ( '1' !== $get_pro ) {
217
+
218
+ $optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro', 'opt_out' ), 'opt_out' );
219
+
220
+ $message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><strong>Premium Addons PRO&nbsp</strong><span> is now available!&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' ,$url );
221
+
222
+ } else if ( '1' !== $get_pro_sale ) {
223
+
224
+ $optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro_sale', 'opt_out' ), 'opt_out' );
225
+
226
+ $message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;">10 Early Bird Sale on&nbsp<strong>Premium Addons PRO.&nbsp</strong><span> Don’t Miss It&nbsp</span><a href="%s" target="_blank" style="flex-grow: 2;"> Click Here To Get It.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png' ,$url );
227
+
228
}
229
230
$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 );
231
232
$this->render_admin_notices( $message );
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.5.6
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
@@ -84,6 +84,7 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
84
23. [Premium Twitter Feed](https://premiumaddons.com/twitter-feed-widget-for-elementor-page-builder/)
85
24. [Premium Tabs](https://premiumaddons.com/tabs-widget-for-elementor-page-builder-2/)
86
25. [Premium Unfold](https://premiumaddons.com/unfold-widget-for-elementor-page-builder/)
87
88
89
== Installation ==
@@ -137,6 +138,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
137
138
== Changelog ==
139
140
= 2.5.6 =
141
142
- Tweak: Added marker clustering and latitude/longitude finder options to Premium Maps widget.
5
Requires at least: 4.5
6
Tested up to: 4.9.8
7
Requires PHP: 5.4
8
+ Stable tag: 2.5.7
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
84
23. [Premium Twitter Feed](https://premiumaddons.com/twitter-feed-widget-for-elementor-page-builder/)
85
24. [Premium Tabs](https://premiumaddons.com/tabs-widget-for-elementor-page-builder-2/)
86
25. [Premium Unfold](https://premiumaddons.com/unfold-widget-for-elementor-page-builder/)
87
+ 26. [Premium Whatsapp Chat](https://premiumaddons.com/whatsapp-widget-for-elementor-page-builder/)
88
89
90
== Installation ==
138
139
== Changelog ==
140
141
+ = 2.5.7 =
142
+
143
+ - Tweak: Added max width option for markers description box in Premium Maps widget.
144
+ - Tweak: Added change default category name in Premium Grid widget.
145
+
146
= 2.5.6 =
147
148
- Tweak: Added marker clustering and latitude/longitude finder options to Premium Maps widget.
widgets/premium-grid.php CHANGED
@@ -45,6 +45,15 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
45
'label' => esc_html__('Categories','premium-addons-for-elementor'),
46
]);
47
48
$repeater = new REPEATER();
49
50
$repeater->add_control( 'premium_gallery_img_cat',
@@ -71,7 +80,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
71
'title_field' => '{{{ premium_gallery_img_cat }}}',
72
]
73
);
74
-
75
$this->end_controls_section();
76
77
$this->start_controls_section('premium_gallery_content',
@@ -79,6 +88,92 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
79
'label' => esc_html__('Images','premium-addons-for-elementor'),
80
]);
81
82
$this->add_control('premium_gallery_img_content',
83
[
84
'label' => __( 'Images', 'premium-addons-for-elementor' ),
@@ -95,76 +190,8 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
95
'premium_gallery_img_alt' => 'Premium Grid Image'
96
],
97
],
98
- 'fields' => [
99
- [
100
- 'name' => 'premium_gallery_img',
101
- 'label' => esc_html__( 'Upload Image', 'premium-addons-for-elementor' ),
102
- 'type' => Controls_Manager::MEDIA,
103
- 'default' => [
104
- 'url' => Utils::get_placeholder_image_src(),
105
- ],
106
- ],
107
- [
108
- 'name' => 'premium_gallery_img_name',
109
- 'label' => esc_html__( 'Name', 'premium-addons-for-elementor' ),
110
- 'type' => Controls_Manager::TEXT,
111
- 'dynamic' => [ 'active' => true ],
112
- 'label_block' => true,
113
- ],
114
- [
115
- 'name' => 'premium_gallery_img_alt',
116
- 'label' => esc_html__( 'Alt', 'premium-addons-for-elementor' ),
117
- 'type' => Controls_Manager::TEXT,
118
- 'dynamic' => [ 'active' => true ],
119
- 'label_block' => true,
120
- ],
121
- [
122
- 'name' => 'premium_gallery_img_desc',
123
- 'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
124
- 'type' => Controls_Manager::TEXTAREA,
125
- 'dynamic' => [ 'active' => true ],
126
- 'label_block' => true,
127
- ],
128
- [
129
- 'name' => 'premium_gallery_img_category',
130
- 'label' => esc_html__( 'Category', 'premium-addons-for-elementor' ),
131
- 'type' => Controls_Manager::TEXT,
132
- 'dynamic' => [ 'active' => true ],
133
- ],
134
- [
135
- 'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
136
- 'name' => 'premium_gallery_img_link_type',
137
- 'type' => Controls_Manager::SELECT,
138
- 'options' => [
139
- 'url' => esc_html__('URL', 'premium-addons-for-elementor'),
140
- 'link' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
141
- ],
142
- 'default' => 'url',
143
- 'label_block' => true,
144
- ],
145
- [
146
- 'label' => esc_html__('Link', 'premium-addons-for-elementor'),
147
- 'name' => 'premium_gallery_img_link',
148
- 'type' => Controls_Manager::URL,
149
- 'placeholder' => 'https://premiumaddons.com/',
150
- 'label_block' => true,
151
- 'condition' => [
152
- 'premium_gallery_img_link_type' => 'url'
153
- ]
154
- ],
155
- [
156
- 'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
157
- 'name' => 'premium_gallery_img_existing',
158
- 'type' => Controls_Manager::SELECT2,
159
- 'options' => $this->getTemplateInstance()->get_all_post(),
160
- 'condition' => [
161
- 'premium_gallery_img_link_type'=> 'link',
162
- ],
163
- 'multiple' => false,
164
- 'separator' => 'after',
165
- 'label_block' => true,
166
- ]
167
- ],
168
]
169
);
170
@@ -1029,7 +1056,7 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
1029
<?php if($filter == 'yes') : ?>
1030
<div class="premium-img-gallery-filter">
1031
<ul class="premium-gallery-cats-container">
1032
- <li><a href="javascript:;" class="category active" data-filter="*"><span>All</span></a></li>
1033
<?php foreach( $settings['premium_gallery_cats_content'] as $category ) : ?>
1034
<?php if(!empty($category['premium_gallery_img_cat'] ) ) :
1035
$cat_filtered = $this->filter_cats($category['premium_gallery_img_cat']);
45
'label' => esc_html__('Categories','premium-addons-for-elementor'),
46
]);
47
48
+ $this->add_control( 'premium_gallery_first_cat_label',
49
+ [
50
+ 'label' => esc_html__( 'First Category Label', 'premium-addons-for-elementor' ),
51
+ 'type' => Controls_Manager::TEXT,
52
+ 'default' => esc_html__('All', 'premium-addons-for-elementor'),
53
+ 'dynamic' => [ 'active' => true ],
54
+ ]
55
+ );
56
+
57
$repeater = new REPEATER();
58
59
$repeater->add_control( 'premium_gallery_img_cat',
80
'title_field' => '{{{ premium_gallery_img_cat }}}',
81
]
82
);
83
+
84
$this->end_controls_section();
85
86
$this->start_controls_section('premium_gallery_content',
88
'label' => esc_html__('Images','premium-addons-for-elementor'),
89
]);
90
91
+ $img_repeater = new REPEATER();
92
+
93
+ $img_repeater->add_control('premium_gallery_img',
94
+ [
95
+ 'label' => esc_html__( 'Upload Image', 'premium-addons-for-elementor' ),
96
+ 'type' => Controls_Manager::MEDIA,
97
+ 'default' => [
98
+ 'url' => Utils::get_placeholder_image_src(),
99
+ ],
100
+ ]);
101
+
102
+ $img_repeater->add_control('premium_gallery_img_name',
103
+ [
104
+ 'label' => esc_html__( 'Name', 'premium-addons-for-elementor' ),
105
+ 'type' => Controls_Manager::TEXT,
106
+ 'dynamic' => [ 'active' => true ],
107
+ 'label_block' => true,
108
+ ]);
109
+
110
+ $img_repeater->add_control('premium_gallery_img_alt',
111
+ [
112
+ 'label' => esc_html__( 'Alt', 'premium-addons-for-elementor' ),
113
+ 'type' => Controls_Manager::TEXT,
114
+ 'dynamic' => [ 'active' => true ],
115
+ 'label_block' => true,
116
+ ]);
117
+
118
+ $img_repeater->add_control('premium_gallery_img_alt',
119
+ [
120
+ 'label' => esc_html__( 'Alt', 'premium-addons-for-elementor' ),
121
+ 'type' => Controls_Manager::TEXT,
122
+ 'dynamic' => [ 'active' => true ],
123
+ 'label_block' => true,
124
+ ]);
125
+
126
+ $img_repeater->add_control('premium_gallery_img_desc',
127
+ [
128
+ 'label' => esc_html__( 'Description', 'premium-addons-for-elementor' ),
129
+ 'type' => Controls_Manager::TEXTAREA,
130
+ 'dynamic' => [ 'active' => true ],
131
+ 'label_block' => true,
132
+ ]);
133
+
134
+ $img_repeater->add_control('premium_gallery_img_category',
135
+ [
136
+ 'label' => esc_html__( 'Category', 'premium-addons-for-elementor' ),
137
+ 'type' => Controls_Manager::TEXT,
138
+ 'dynamic' => [ 'active' => true ],
139
+ ]);
140
+
141
+ $img_repeater->add_control('premium_gallery_img_link_type',
142
+ [
143
+ 'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
144
+ 'type' => Controls_Manager::SELECT,
145
+ 'options' => [
146
+ 'url' => esc_html__('URL', 'premium-addons-for-elementor'),
147
+ 'link' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
148
+ ],
149
+ 'default' => 'url',
150
+ 'label_block' => true,
151
+ ]);
152
+
153
+ $img_repeater->add_control('premium_gallery_img_link',
154
+ [
155
+ 'label' => esc_html__('Link', 'premium-addons-for-elementor'),
156
+ 'type' => Controls_Manager::URL,
157
+ 'placeholder' => 'https://premiumaddons.com/',
158
+ 'label_block' => true,
159
+ 'condition' => [
160
+ 'premium_gallery_img_link_type' => 'url'
161
+ ]
162
+ ]);
163
+
164
+ $img_repeater->add_control('premium_gallery_img_existing',
165
+ [
166
+ 'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
167
+ 'type' => Controls_Manager::SELECT2,
168
+ 'options' => $this->getTemplateInstance()->get_all_post(),
169
+ 'condition' => [
170
+ 'premium_gallery_img_link_type'=> 'link',
171
+ ],
172
+ 'multiple' => false,
173
+ 'separator' => 'after',
174
+ 'label_block' => true,
175
+ ]);
176
+
177
$this->add_control('premium_gallery_img_content',
178
[
179
'label' => __( 'Images', 'premium-addons-for-elementor' ),
190
'premium_gallery_img_alt' => 'Premium Grid Image'
191
],
192
],
193
+ 'fields' => array_values( $img_repeater->get_controls() ),
194
+ 'title_field' => '{{{ premium_gallery_img_name }}}' . ' / {{{ premium_gallery_img_category }}}',
195
]
196
);
197
1056
<?php if($filter == 'yes') : ?>
1057
<div class="premium-img-gallery-filter">
1058
<ul class="premium-gallery-cats-container">
1059
+ <li><a href="javascript:;" class="category active" data-filter="*"><span><?php echo $settings['premium_gallery_first_cat_label']; ?></span></a></li>
1060
<?php foreach( $settings['premium_gallery_cats_content'] as $category ) : ?>
1061
<?php if(!empty($category['premium_gallery_img_cat'] ) ) :
1062
$cat_filtered = $this->filter_cats($category['premium_gallery_img_cat']);
widgets/premium-maps.php CHANGED
@@ -52,12 +52,22 @@ class Premium_Maps_Widget extends Widget_Base
52
);
53
}
54
55
$this->add_control('premium_map_notice',
56
[
57
'label' => __( 'Find Latitude & Longitude', 'elementor' ),
58
'type' => Controls_Manager::RAW_HTML,
59
'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>',
60
'label_block' => true,
61
]
62
);
63
@@ -89,15 +99,33 @@ class Premium_Maps_Widget extends Widget_Base
89
'label' => esc_html__('Markers', 'premium-addons-for-elementor'),
90
]
91
);
92
93
$repeater = new REPEATER();
94
95
$repeater->add_control('premium_map_pin_notice',
96
[
97
'label' => __( 'Find Latitude & Longitude', 'elementor' ),
98
'type' => Controls_Manager::RAW_HTML,
99
'raw' => '<form onsubmit="getPinAddress(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="getPinAddress(this)"></form><div class="premium-address-result" style="margin-top:10px; line-height: 1.3; font-size: 12px;"></div>',
100
'label_block' => true,
101
]
102
);
103
@@ -606,6 +634,8 @@ class Premium_Maps_Widget extends Widget_Base
606
$centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
607
$centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
608
609
$map_settings = [
610
'zoom' => $settings['premium_maps_map_zoom']['size'],
611
'maptype' => $settings['premium_maps_map_type'],
@@ -632,7 +662,7 @@ class Premium_Maps_Widget extends Widget_Base
632
<?php
633
foreach($map_pins as $pin){
634
?>
635
- <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']; ?>">
636
<?php if(!empty($pin['pin_title'])|| !empty($pin['pin_desc'])):?>
637
638
<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>
52
);
53
}
54
55
+ $this->add_control('premium_map_location_finder',
56
+ [
57
+ 'label' => esc_html__( 'Latitude & Longitude Finder', 'premium-addons-for-elementor' ),
58
+ 'type' => Controls_Manager::SWITCHER,
59
+ ]
60
+ );
61
+
62
$this->add_control('premium_map_notice',
63
[
64
'label' => __( 'Find Latitude & Longitude', 'elementor' ),
65
'type' => Controls_Manager::RAW_HTML,
66
'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>',
67
'label_block' => true,
68
+ 'condition' => [
69
+ 'premium_map_location_finder' => 'yes'
70
+ ]
71
]
72
);
73
99
'label' => esc_html__('Markers', 'premium-addons-for-elementor'),
100
]
101
);
102
+
103
+ $this->add_control('premium_maps_markers_width',
104
+ [
105
+ 'label' => esc_html__('Max Width', 'premium-addons-for-elementor'),
106
+ 'type' => Controls_Manager::NUMBER,
107
+ 'title' => esc_html__('Set the Maximum width for markers description box','premium-addons-for-elementor'),
108
+ ]
109
+ );
110
111
$repeater = new REPEATER();
112
113
+ $repeater->add_control('premium_map_pin_location_finder',
114
+ [
115
+ 'label' => esc_html__( 'Latitude & Longitude Finder', 'premium-addons-for-elementor' ),
116
+ 'type' => Controls_Manager::SWITCHER,
117
+ ]
118
+ );
119
+
120
$repeater->add_control('premium_map_pin_notice',
121
[
122
'label' => __( 'Find Latitude & Longitude', 'elementor' ),
123
'type' => Controls_Manager::RAW_HTML,
124
'raw' => '<form onsubmit="getPinAddress(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="getPinAddress(this)"></form><div class="premium-address-result" style="margin-top:10px; line-height: 1.3; font-size: 12px;"></div>',
125
'label_block' => true,
126
+ 'condition' => [
127
+ 'premium_map_pin_location_finder' => 'yes'
128
+ ]
129
]
130
);
131
634
$centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
635
$centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
636
637
+ $marker_width = !empty($settings['premium_maps_markers_width']) ? $settings['premium_maps_markers_width'] : 1000;
638
+
639
$map_settings = [
640
'zoom' => $settings['premium_maps_map_zoom']['size'],
641
'maptype' => $settings['premium_maps_map_type'],
662
<?php
663
foreach($map_pins as $pin){
664
?>
665
+ <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; ?>">
666
<?php if(!empty($pin['pin_title'])|| !empty($pin['pin_desc'])):?>
667
668
<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>