Premium Addons for Elementor - Version 2.1.5

Version Description

  • Tweak: Added Icon option for Premium Modal Box widgets button.
  • Tweak: Added include template content option for Premium Modal Box widget.
  • Tweak: Enhanced Javascript loading and performance.
  • Fix: Premium Fancy Text Add item with Slide up effect bug on Firefox.
  • Fix: Premium Button RTL bug.
Download this release

Release Info

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

Code changes from version 2.1.5-beta1 to 2.1.5

admin/settings-page.php CHANGED
@@ -356,7 +356,7 @@ class PA_admin_settings {
356
357
<tr class="pa-roll-row">
358
<th>Rollback Version</th>
359
- <td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.1.2</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
360
</tr>
361
<tr>
362
<th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
356
357
<tr class="pa-roll-row">
358
<th>Rollback Version</th>
359
+ <td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.1.4</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
360
</tr>
361
<tr>
362
<th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
includes/beta-testers.php CHANGED
@@ -41,6 +41,7 @@ class PA_Beta_Testers {
41
$response->new_version = $beta_version;
42
$response->url = 'https://premiumaddons.com/';
43
$response->package = sprintf( 'https://downloads.wordpress.org/plugin/premium-addons-for-elementor.%s.zip', $beta_version );
44
$transient->response[ PREMIUM_ADDONS_BASENAME ] = $response;
45
}
46
41
$response->new_version = $beta_version;
42
$response->url = 'https://premiumaddons.com/';
43
$response->package = sprintf( 'https://downloads.wordpress.org/plugin/premium-addons-for-elementor.%s.zip', $beta_version );
44
+ echo $response->package;
45
$transient->response[ PREMIUM_ADDONS_BASENAME ] = $response;
46
}
47
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.1.5-beta1
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
23
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
25
- define( 'PREMIUM_ADDONS_VERSION', '2.1.5-beta1' );
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.1.2');
31
32
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.1.5
7
Author: Leap13
8
Author URI: http://leap13.com/
9
Text Domain: premium-addons-for-elementor
22
23
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
25
+ define( 'PREMIUM_ADDONS_VERSION', '2.1.5' );
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.1.4');
31
32
33
/**
queries.php CHANGED
@@ -1,5 +1,6 @@
1
<?php
2
3
4
function premium_blog_get_post_data($args, $paged, $new_offset){
5
$defaults = array(
1
<?php
2
3
+ if (!defined('ABSPATH')) exit;
4
5
function premium_blog_get_post_data($args, $paged, $new_offset){
6
$defaults = array(
readme.txt CHANGED
@@ -5,8 +5,7 @@ Donate link: http://premiumaddons.com
5
Requires at least: 4.5
6
Tested up to: 4.9.4
7
Requires PHP: 5.4
8
- Stable tag: 2.1.4
9
- Beta tag: 2.1.5-beta1
10
License: GPL v3.0
11
License URI: https://opensource.org/licenses/GPL-3.0
12
@@ -102,8 +101,11 @@ Premium Addons for Elementor is light weight and we also gave you the control to
102
103
= 2.1.5 =
104
105
- Tweak: Enhanced Javascript loading and performance.
106
- Fix: Premium Fancy Text Add item with Slide up effect bug on Firefox.
107
108
= 2.1.4 =
109
5
Requires at least: 4.5
6
Tested up to: 4.9.4
7
Requires PHP: 5.4
8
+ Stable tag: 2.1.5
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
101
102
= 2.1.5 =
103
104
+ - Tweak: Added Icon option for Premium Modal Box widget’s button.
105
+ - Tweak: Added include template content option for Premium Modal Box widget.
106
- Tweak: Enhanced Javascript loading and performance.
107
- Fix: Premium Fancy Text Add item with Slide up effect bug on Firefox.
108
+ - Fix: Premium Button RTL bug.
109
110
= 2.1.4 =
111
widgets/premium-button.php CHANGED
@@ -9,6 +9,10 @@ class Premium_Button_Widget extends Widget_Base
9
return 'premium-addon-button';
10
}
11
12
public function getTemplateInstance() {
13
return $this->templateInstance = premium_Template_Tags::getInstance();
14
}
@@ -229,8 +233,8 @@ class Premium_Button_Widget extends Widget_Base
229
'type' => Controls_Manager::SELECT,
230
'default' => 'before',
231
'options' => [
232
- 'before' => esc_html__('Before'),
233
- 'after' => esc_html__('After'),
234
],
235
'condition' => [
236
'premium_button_icon_switcher' => 'yes',
@@ -267,7 +271,8 @@ class Premium_Button_Widget extends Widget_Base
267
]
268
);
269
270
- $this->add_control('premium_button_icon_before_spacing',
271
[
272
'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
273
'type' => Controls_Manager::SLIDER,
@@ -284,8 +289,10 @@ class Premium_Button_Widget extends Widget_Base
284
],
285
'separator' => 'after',
286
]
287
- );
288
289
$this->add_control('premium_button_icon_after_spacing',
290
[
291
'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
@@ -303,7 +310,50 @@ class Premium_Button_Widget extends Widget_Base
303
],
304
'separator' => 'after',
305
]
306
- );
307
308
$this->add_control('premium_button_icon_style3_before_transition',
309
[
9
return 'premium-addon-button';
10
}
11
12
+ public function check_rtl(){
13
+ return is_rtl();
14
+ }
15
+
16
public function getTemplateInstance() {
17
return $this->templateInstance = premium_Template_Tags::getInstance();
18
}
233
'type' => Controls_Manager::SELECT,
234
'default' => 'before',
235
'options' => [
236
+ 'before' => esc_html__('Before', 'premium-addons-for-elementor'),
237
+ 'after' => esc_html__('After', 'premium-addons-for-elementor'),
238
],
239
'condition' => [
240
'premium_button_icon_switcher' => 'yes',
271
]
272
);
273
274
+ if(!$this->check_rtl()){
275
+ $this->add_control('premium_button_icon_before_spacing',
276
[
277
'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
278
'type' => Controls_Manager::SLIDER,
289
],
290
'separator' => 'after',
291
]
292
+ );
293
+ }
294
295
+ if(!$this->check_rtl()){
296
$this->add_control('premium_button_icon_after_spacing',
297
[
298
'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
310
],
311
'separator' => 'after',
312
]
313
+ );
314
+ }
315
+
316
+ if($this->check_rtl()){
317
+ $this->add_control('premium_button_icon_rtl_before_spacing',
318
+ [
319
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
320
+ 'type' => Controls_Manager::SLIDER,
321
+ 'condition' => [
322
+ 'premium_button_icon_switcher' => 'yes',
323
+ 'premium_button_icon_position' => 'before',
324
+ 'premium_button_hover_effect!' => ['style3', 'style4']
325
+ ],
326
+ 'default' => [
327
+ 'size' => 15
328
+ ],
329
+ 'selectors' => [
330
+ '{{WRAPPER}} .premium-button-text-icon-wrapper i' => 'margin-left: {{SIZE}}px',
331
+ ],
332
+ 'separator' => 'after',
333
+ ]
334
+ );
335
+ }
336
+
337
+ if($this->check_rtl()){
338
+ $this->add_control('premium_button_icon_rtl_after_spacing',
339
+ [
340
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
341
+ 'type' => Controls_Manager::SLIDER,
342
+ 'condition' => [
343
+ 'premium_button_icon_switcher' => 'yes',
344
+ 'premium_button_icon_position' => 'after',
345
+ 'premium_button_hover_effect!' => ['style3', 'style4']
346
+ ],
347
+ 'default' => [
348
+ 'size' => 15
349
+ ],
350
+ 'selectors' => [
351
+ '{{WRAPPER}} .premium-button-text-icon-wrapper i' => 'margin-right: {{SIZE}}px',
352
+ ],
353
+ 'separator' => 'after',
354
+ ]
355
+ );
356
+ }
357
358
$this->add_control('premium_button_icon_style3_before_transition',
359
[
widgets/premium-maps.php CHANGED
@@ -40,13 +40,17 @@ class Premium_Maps_Widget extends Widget_Base
40
'label' => esc_html__('Center Location', 'premium-addons-for-elementor'),
41
]
42
);
43
-
44
- $this->add_control('premium_maps_api_url',
45
- [
46
'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
47
'type' => Controls_Manager::RAW_HTML,
48
- ]
49
- );
50
51
$this->add_control('premium_maps_center_lat',
52
[
@@ -595,12 +599,7 @@ class Premium_Maps_Widget extends Widget_Base
595
} ?>
596
597
</div>
598
- <script>
599
-
600
- </script>
601
602
-
603
-
604
<?php
605
}
606
}
40
'label' => esc_html__('Center Location', 'premium-addons-for-elementor'),
41
]
42
);
43
+
44
+ $map_api = get_option( 'pa_save_settings' )['premium-map-api'];
45
+ if(!isset($map_api) || empty($map_api)){
46
+ $this->add_control('premium_maps_api_url',
47
+ [
48
'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
49
'type' => Controls_Manager::RAW_HTML,
50
+ ]
51
+ );
52
+ }
53
+
54
55
$this->add_control('premium_maps_center_lat',
56
[
599
} ?>
600
601
</div>
602
603
<?php
604
}
605
}
widgets/premium-modalbox.php CHANGED
@@ -5,9 +5,17 @@ if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
6
class Premium_Modal_Box_Widget extends Widget_Base
7
{
8
public function get_name() {
9
return 'premium-addon-modal-box';
10
}
11
12
public function get_title() {
13
return esc_html__('Premium Modal Box', 'premium-addons-for-elementor');
@@ -30,7 +38,6 @@ class Premium_Modal_Box_Widget extends Widget_Base
30
// Adding the controls fields for the premium modal box
31
// This will controls the animation, colors and background, dimensions etc
32
protected function _register_controls() {
33
-
34
/* Start Box Content Section */
35
36
$this->start_controls_section('premium_modal_box_selector_content_section',
@@ -39,6 +46,17 @@ class Premium_Modal_Box_Widget extends Widget_Base
39
]
40
);
41
42
/*Icon To Display*/
43
$this->add_control('premium_modal_box_icon_selection',
44
[
@@ -51,6 +69,9 @@ class Premium_Modal_Box_Widget extends Widget_Base
51
'image' => esc_html('Custom Image'),
52
],
53
'default' => 'noicon',
54
'label_block' => true
55
]
56
);
@@ -62,6 +83,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
62
'type' => Controls_Manager::ICON,
63
'condition' => [
64
'premium_modal_box_icon_selection' => 'fonticon',
65
],
66
'label_block' => true,
67
]
@@ -77,6 +99,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
77
],
78
'condition' => [
79
'premium_modal_box_icon_selection' => 'image',
80
],
81
'label_block' => true,
82
]
@@ -89,6 +112,9 @@ class Premium_Modal_Box_Widget extends Widget_Base
89
'type' => Controls_Manager::TEXT,
90
'description' => esc_html__('Provide the modal box with a title', 'premium-addons-for-elementor'),
91
'default' => 'Modal Box Title',
92
'label_block' => true,
93
]
94
);
@@ -101,12 +127,42 @@ class Premium_Modal_Box_Widget extends Widget_Base
101
]
102
);
103
104
/*Modal Box Content*/
105
$this->add_control('premium_modal_box_content',
106
[
107
'type' => Controls_Manager::WYSIWYG,
108
'default' => 'Modal Box Content',
109
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
110
'show_label' => false,
111
]
112
);
@@ -117,6 +173,9 @@ class Premium_Modal_Box_Widget extends Widget_Base
117
'label' => esc_html__('Upper Close Button', 'premium-addons-for-elementor'),
118
'type' => Controls_Manager::SWITCHER,
119
'default' => 'yes',
120
]
121
);
122
@@ -167,6 +226,145 @@ class Premium_Modal_Box_Widget extends Widget_Base
167
]
168
);
169
170
/*Button Size*/
171
$this->add_control('premium_modal_box_button_size',
172
[
@@ -289,6 +487,23 @@ class Premium_Modal_Box_Widget extends Widget_Base
289
]
290
]
291
);
292
293
/*Selector Text Typography*/
294
$this->add_group_control(
@@ -489,6 +704,9 @@ class Premium_Modal_Box_Widget extends Widget_Base
489
[
490
'label' => esc_html__('Heading', 'premium-addons-for-elementor'),
491
'tab' => Controls_Manager::TAB_STYLE,
492
]
493
);
494
@@ -536,6 +754,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
536
'tab' => Controls_Manager::TAB_STYLE,
537
'condition' => [
538
'premium_modal_box_upper_close' => 'yes',
539
]
540
]
541
);
@@ -962,7 +1181,12 @@ class Premium_Modal_Box_Widget extends Widget_Base
962
$settings = $this->get_settings();
963
$this->add_inline_editing_attributes('premium_modal_box_selector_text');
964
965
- $modal_settings = [
966
'trigger' => $settings['premium_modal_box_display_on'],
967
'delay' => $settings['premium_modal_box_popup_delay'],
968
];
@@ -978,7 +1202,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
978
if( $settings['premium_modal_box_button_size'] === 'sm' ) : echo "btn-sm";
979
elseif( $settings['premium_modal_box_button_size'] === 'md' ) : echo "btn-md";
980
elseif( $settings['premium_modal_box_button_size'] === 'lg' ) : echo "btn-lg";
981
- elseif( $settings['premium_modal_box_button_size'] === 'block' ) : echo "btn-block"; endif; ?>" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>"><?php echo $settings['premium_modal_box_button_text']; ?></button>
982
<?php elseif ( $settings['premium_modal_box_display_on'] === 'image' ) : ?>
983
<img class="premium-modal-box-img-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" src="<?php echo $settings['premium_modal_box_image_src']['url'];?>">
984
<?php elseif($settings['premium_modal_box_display_on'] === 'text') : ?>
@@ -994,6 +1218,7 @@ class Premium_Modal_Box_Widget extends Widget_Base
994
995
<!-- Modal content-->
996
<div class="modal-content premium-modal-box-modal-content">
997
<div class="modal-header premium-modal-box-modal-header">
998
<?php if ( $settings['premium_modal_box_upper_close'] === 'yes' ) : ?>
999
<div class="premium-modal-box-close-button-container">
@@ -1007,8 +1232,9 @@ class Premium_Modal_Box_Widget extends Widget_Base
1007
<img src="<?php echo $settings['premium_modal_box_image_icon']['url'];?>">
1008
<?php endif; ?><?php echo $settings['premium_modal_box_title'];?></h3>
1009
</div>
1010
<div class="modal-body premium-modal-box-modal-body">
1011
- <?php echo $settings['premium_modal_box_content'];?>
1012
</div>
1013
<?php if ( $settings['premium_modal_box_lower_close'] === 'yes' ) : ?>
1014
<div class="modal-footer premium-modal-box-modal-footer">
5
6
class Premium_Modal_Box_Widget extends Widget_Base
7
{
8
+ public function getTemplateInstance(){
9
+ return $this->templateInstance = premium_Template_Tags::getInstance();
10
+ }
11
+
12
public function get_name() {
13
return 'premium-addon-modal-box';
14
}
15
+
16
+ public function check_rtl(){
17
+ return is_rtl();
18
+ }
19
20
public function get_title() {
21
return esc_html__('Premium Modal Box', 'premium-addons-for-elementor');
38
// Adding the controls fields for the premium modal box
39
// This will controls the animation, colors and background, dimensions etc
40
protected function _register_controls() {
41
/* Start Box Content Section */
42
43
$this->start_controls_section('premium_modal_box_selector_content_section',
46
]
47
);
48
49
+ $this->add_control('premium_modal_box_header_switcher',
50
+ [
51
+ 'label' => esc_html__('Header', 'premium-addons-for-elementor'),
52
+ 'type' => Controls_Manager::SWITCHER,
53
+ 'label_on' => 'show',
54
+ 'label_off' => 'hide',
55
+ 'default' => 'yes',
56
+ 'description' => esc_html__('Enable or disable modal header','premium-addons-for-elementor'),
57
+ ]
58
+ );
59
+
60
/*Icon To Display*/
61
$this->add_control('premium_modal_box_icon_selection',
62
[
69
'image' => esc_html('Custom Image'),
70
],
71
'default' => 'noicon',
72
+ 'condition' => [
73
+ 'premium_modal_box_header_switcher' => 'yes'
74
+ ],
75
'label_block' => true
76
]
77
);
83
'type' => Controls_Manager::ICON,
84
'condition' => [
85
'premium_modal_box_icon_selection' => 'fonticon',
86
+ 'premium_modal_box_header_switcher' => 'yes'
87
],
88
'label_block' => true,
89
]
99
],
100
'condition' => [
101
'premium_modal_box_icon_selection' => 'image',
102
+ 'premium_modal_box_header_switcher' => 'yes'
103
],
104
'label_block' => true,
105
]
112
'type' => Controls_Manager::TEXT,
113
'description' => esc_html__('Provide the modal box with a title', 'premium-addons-for-elementor'),
114
'default' => 'Modal Box Title',
115
+ 'condition' => [
116
+ 'premium_modal_box_header_switcher' => 'yes'
117
+ ],
118
'label_block' => true,
119
]
120
);
127
]
128
);
129
130
+ /*Modal Box Content Type*/
131
+ $this->add_control('premium_modal_box_content_type',
132
+ [
133
+ 'label' => esc_html__('Content to Show', 'premium-addons-for-elementor'),
134
+ 'type' => Controls_Manager::SELECT,
135
+ 'options' => [
136
+ 'editor' => esc_html('Text Editor', 'premium-addons-for-elementor'),
137
+ 'template' => esc_html('Elementor Template', 'premium-addons-for-elementor'),
138
+ ],
139
+ 'default' => 'editor',
140
+ 'label_block' => true
141
+ ]
142
+ );
143
+
144
+ /*Modal Box Elementor Template*/
145
+ $this->add_control('premium_modal_box_content_temp',
146
+ [
147
+ 'label' => esc_html__( 'Content', 'premium-addons-for-elementor' ),
148
+ 'description' => esc_html__( 'Modal content is a template which you can choose from Elementor library. Each template will be a slider content', 'premium-addons-for-elementor' ),
149
+ 'type' => Controls_Manager::SELECT2,
150
+ 'options' => $this->getTemplateInstance()->get_elementor_page_list(),
151
+ 'condition' => [
152
+ 'premium_modal_box_content_type' => 'template',
153
+ ],
154
+ ]
155
+ );
156
+
157
/*Modal Box Content*/
158
$this->add_control('premium_modal_box_content',
159
[
160
'type' => Controls_Manager::WYSIWYG,
161
'default' => 'Modal Box Content',
162
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
163
+ 'condition' => [
164
+ 'premium_modal_box_content_type' => 'editor',
165
+ ],
166
'show_label' => false,
167
]
168
);
173
'label' => esc_html__('Upper Close Button', 'premium-addons-for-elementor'),
174
'type' => Controls_Manager::SWITCHER,
175
'default' => 'yes',
176
+ 'condition' => [
177
+ 'premium_modal_box_header_switcher' => 'yes'
178
+ ]
179
]
180
);
181
226
]
227
);
228
229
+ $this->add_control('premium_modal_box_icon_switcher',
230
+ [
231
+ 'label' => esc_html__('Icon', 'premium-addons-for-elementor'),
232
+ 'type' => Controls_Manager::SWITCHER,
233
+ 'condition' => [
234
+ 'premium_modal_box_display_on' => 'button'
235
+ ],
236
+ 'description' => esc_html__('Enable or disable button icon','premium-addons-for-elementor'),
237
+ ]
238
+ );
239
+
240
+ $this->add_control('premium_modal_box_button_icon_selection',
241
+ [
242
+ 'label' => esc_html__('Icon', 'premium-addons-for-elementor'),
243
+ 'type' => Controls_Manager::ICON,
244
+ 'default' => 'fa fa-bars',
245
+ 'condition' => [
246
+ 'premium_modal_box_display_on' => 'button',
247
+ 'premium_modal_box_icon_switcher' => 'yes'
248
+ ],
249
+ 'label_block' => true,
250
+ ]
251
+ );
252
+
253
+ $this->add_control('premium_modal_box_icon_position',
254
+ [
255
+ 'label' => esc_html__('Icon Position', 'premium-addons-for-elementor'),
256
+ 'type' => Controls_Manager::SELECT,
257
+ 'default' => 'before',
258
+ 'options' => [
259
+ 'before' => esc_html__('Before'),
260
+ 'after' => esc_html__('After'),
261
+ ],
262
+ 'condition' => [
263
+ 'premium_modal_box_display_on' => 'button',
264
+ 'premium_modal_box_icon_switcher' => 'yes'
265
+ ],
266
+ 'label_block' => true,
267
+ ]
268
+ );
269
+
270
+ $this->add_control('premium_modal_box_icon_before_size',
271
+ [
272
+ 'label' => esc_html__('Icon Size', 'premium-addons-for-elementor'),
273
+ 'type' => Controls_Manager::SLIDER,
274
+ 'condition' => [
275
+ 'premium_modal_box_display_on' => 'button',
276
+ 'premium_modal_box_icon_switcher' => 'yes'
277
+ ],
278
+ 'selectors' => [
279
+ '{{WRAPPER}} .premium-modal-box-button-selector i '=> 'font-size: {{SIZE}}px',
280
+ ]
281
+ ]
282
+ );
283
+
284
+ if(!$this->check_rtl()){
285
+ $this->add_control('premium_modal_box_icon_before_spacing',
286
+ [
287
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
288
+ 'type' => Controls_Manager::SLIDER,
289
+ 'condition' => [
290
+ 'premium_modal_box_display_on' => 'button',
291
+ 'premium_modal_box_icon_switcher' => 'yes',
292
+ 'premium_modal_box_icon_position' => 'before'
293
+ ],
294
+ 'default' => [
295
+ 'size' => 15
296
+ ],
297
+ 'selectors' => [
298
+ '{{WRAPPER}} .premium-modal-box-button-selector i' => 'margin-right: {{SIZE}}px',
299
+ ],
300
+ 'separator' => 'after',
301
+ ]
302
+ );
303
+ }
304
+
305
+ if(!$this->check_rtl()){
306
+ $this->add_control('premium_modal_box_icon_after_spacing',
307
+ [
308
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
309
+ 'type' => Controls_Manager::SLIDER,
310
+ 'condition' => [
311
+ 'premium_modal_box_display_on' => 'button',
312
+ 'premium_modal_box_icon_switcher' => 'yes',
313
+ 'premium_modal_box_icon_position' => 'after'
314
+ ],
315
+ 'default' => [
316
+ 'size' => 15
317
+ ],
318
+ 'selectors' => [
319
+ '{{WRAPPER}} .premium-modal-box-button-selector i' => 'margin-left: {{SIZE}}px',
320
+ ],
321
+ 'separator' => 'after',
322
+ ]
323
+ );
324
+ }
325
+
326
+ if($this->check_rtl()){
327
+ $this->add_control('premium_modal_box_icon_rtl_before_spacing',
328
+ [
329
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
330
+ 'type' => Controls_Manager::SLIDER,
331
+ 'condition' => [
332
+ 'premium_modal_box_display_on' => 'button',
333
+ 'premium_modal_box_icon_switcher' => 'yes',
334
+ 'premium_modal_box_icon_position' => 'before'
335
+ ],
336
+ 'default' => [
337
+ 'size' => 15
338
+ ],
339
+ 'selectors' => [
340
+ '{{WRAPPER}} .premium-modal-box-button-selector i' => 'margin-left: {{SIZE}}px',
341
+ ],
342
+ 'separator' => 'after',
343
+ ]
344
+ );
345
+ }
346
+
347
+ if($this->check_rtl()){
348
+ $this->add_control('premium_modal_box_icon_rtl_after_spacing',
349
+ [
350
+ 'label' => esc_html__('Icon Spacing', 'premium-addons-for-elementor'),
351
+ 'type' => Controls_Manager::SLIDER,
352
+ 'condition' => [
353
+ 'premium_modal_box_display_on' => 'button',
354
+ 'premium_modal_box_icon_switcher' => 'yes',
355
+ 'premium_modal_box_icon_position' => 'after'
356
+ ],
357
+ 'default' => [
358
+ 'size' => 15
359
+ ],
360
+ 'selectors' => [
361
+ '{{WRAPPER}} .premium-modal-box-button-selector i' => 'margin-right: {{SIZE}}px',
362
+ ],
363
+ 'separator' => 'after',
364
+ ]
365
+ );
366
+ }
367
+
368
/*Button Size*/
369
$this->add_control('premium_modal_box_button_size',
370
[
487
]
488
]
489
);
490
+
491
+ $this->add_control('premium_modal_box_button_icon_color',
492
+ [
493
+ 'label' => esc_html__('Icon Color', 'premium-addons-for-elementor'),
494
+ 'type' => Controls_Manager::COLOR,
495
+ 'scheme' => [
496
+ 'type' => Scheme_Color::get_type(),
497
+ 'value' => Scheme_Color::COLOR_2,
498
+ ],
499
+ 'selectors' => [
500
+ '{{WRAPPER}} .premium-modal-box-button-selector i' => 'color:{{VALUE}};',
501
+ ],
502
+ 'condition' => [
503
+ 'premium_modal_box_display_on' => ['button'],
504
+ ]
505
+ ]
506
+ );
507
508
/*Selector Text Typography*/
509
$this->add_group_control(
704
[
705
'label' => esc_html__('Heading', 'premium-addons-for-elementor'),
706
'tab' => Controls_Manager::TAB_STYLE,
707
+ 'condition' => [
708
+ 'premium_modal_box_header_switcher' => 'yes'
709
+ ],
710
]
711
);
712
754
'tab' => Controls_Manager::TAB_STYLE,
755
'condition' => [
756
'premium_modal_box_upper_close' => 'yes',
757
+ 'premium_modal_box_header_switcher' => 'yes'
758
]
759
]
760
);
1181
$settings = $this->get_settings();
1182
$this->add_inline_editing_attributes('premium_modal_box_selector_text');
1183
1184
+ $button_icon = $settings['premium_modal_box_button_icon_selection'];
1185
+
1186
+
1187
+ $elementor_post_id = $settings['premium_modal_box_content_temp'];
1188
+ $premium_elements_frontend = new Frontend;
1189
+ $modal_settings = [
1190
'trigger' => $settings['premium_modal_box_display_on'],
1191
'delay' => $settings['premium_modal_box_popup_delay'],
1192
];
1202
if( $settings['premium_modal_box_button_size'] === 'sm' ) : echo "btn-sm";
1203
elseif( $settings['premium_modal_box_button_size'] === 'md' ) : echo "btn-md";
1204
elseif( $settings['premium_modal_box_button_size'] === 'lg' ) : echo "btn-lg";
1205
+ elseif( $settings['premium_modal_box_button_size'] === 'block' ) : echo "btn-block"; endif; ?>" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>"><?php if($settings['premium_modal_box_icon_switcher'] && $settings['premium_modal_box_icon_position'] == 'before' && !empty($settings['premium_modal_box_button_icon_selection'])) : ?><i class="fa <?php echo esc_attr($button_icon); ?>"></i><?php endif; ?><span><?php echo $settings['premium_modal_box_button_text']; ?></span><?php if($settings['premium_modal_box_icon_switcher'] && $settings['premium_modal_box_icon_position'] == 'after' &&!empty($settings['premium_modal_box_button_icon_selection'])) : ?><i class="fa <?php echo esc_attr($button_icon); ?>"></i><?php endif; ?></button>
1206
<?php elseif ( $settings['premium_modal_box_display_on'] === 'image' ) : ?>
1207
<img class="premium-modal-box-img-selector" data-toggle="premium-modal" data-target="#premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" src="<?php echo $settings['premium_modal_box_image_src']['url'];?>">
1208
<?php elseif($settings['premium_modal_box_display_on'] === 'text') : ?>
1218
1219
<!-- Modal content-->
1220
<div class="modal-content premium-modal-box-modal-content">
1221
+ <?php if($settings['premium_modal_box_header_switcher'] == 'yes'): ?>
1222
<div class="modal-header premium-modal-box-modal-header">
1223
<?php if ( $settings['premium_modal_box_upper_close'] === 'yes' ) : ?>
1224
<div class="premium-modal-box-close-button-container">
1232
<img src="<?php echo $settings['premium_modal_box_image_icon']['url'];?>">
1233
<?php endif; ?><?php echo $settings['premium_modal_box_title'];?></h3>
1234
</div>
1235
+ <?php endif; ?>
1236
<div class="modal-body premium-modal-box-modal-body">
1237
+ <?php if($settings['premium_modal_box_content_type'] == 'editor') : echo $settings['premium_modal_box_content']; else: echo $premium_elements_frontend->get_builder_content($elementor_post_id, true); endif; ?>
1238
</div>
1239
<?php if ( $settings['premium_modal_box_lower_close'] === 'yes' ) : ?>
1240
<div class="modal-footer premium-modal-box-modal-footer">