Premium Addons for Elementor - Version 2.0.9

Version Description

  • Tweak: Added existing page link option for Premium Pricing Table, Button and Image Button widgets.
  • Tweak: Inline Documentations and options usability.
  • Fix: Premium Banner empty URL redirection bug.
  • Fix: Misspelling CSS property corrected.
Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

assets/css/premium-addons.css CHANGED
@@ -1790,7 +1790,7 @@ button.close {
1790
bottom: 0px;
1791
-webkit-transition: all 0.2s ease-in-out;
1792
-moz-transition: all 0.2s ease-in-out;
1793
- -ms-transition: all 0.2x ease-in-out;
1794
-o-transition: all 0.2s ease-in-out;
1795
transition: all 0.2s ease-in-out;
1796
}
1790
bottom: 0px;
1791
-webkit-transition: all 0.2s ease-in-out;
1792
-moz-transition: all 0.2s ease-in-out;
1793
+ -ms-transition: all 0.2s ease-in-out;
1794
-o-transition: all 0.2s ease-in-out;
1795
transition: all 0.2s ease-in-out;
1796
}
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Premium Addons for Elementor
4
Description: This Plugin Includes Elementor Page Builder’s Premium Addon Elements.
5
Plugin URI: https://premiumaddons.com
6
- Version: 2.0.8
7
Author: Leap13
8
Author URI: http://leap13.com/
9
Text Domain: premium-addons-for-elementor
3
Plugin Name: Premium Addons for Elementor
4
Description: This Plugin Includes Elementor Page Builder’s Premium Addon Elements.
5
Plugin URI: https://premiumaddons.com
6
+ Version: 2.0.9
7
Author: Leap13
8
Author URI: http://leap13.com/
9
Text Domain: premium-addons-for-elementor
readme.txt CHANGED
@@ -79,25 +79,32 @@ Premium Addons for Elementor is light weight and we also gave you the control to
79
80
== Changelog ==
81
82
= 2.0.8 =
83
84
- Tweak: Amended inline documentation.
85
- Tweak: Changed admin icon.
86
- - Fixed: Premium Banner Custom URL/existing Page bug.
87
- - Fixed: Premium Button hover background color issue.
88
89
= 2.0.7 =
90
91
- Tweak: Added multiple labels option for Premium Progressbar widget.
92
- Tweak: Added inline editing option for all widgets.
93
- Tweak: Added text editor for marker description for Premium Maps widget.
94
- - Fixed: Premium Button empty URL redirection bug.
95
- - Fixed: Premium Image Button empty URL redirection bug.
96
97
= 2.0.6 =
98
99
- - Fixed: Plugin row meta data bug.
100
- - Fixed: Plugin update issue.
101
102
= 2.0.5 =
103
@@ -109,7 +116,7 @@ Premium Addons for Elementor is light weight and we also gave you the control to
109
- Tweak: Enhanced Premium Blog layout on mobile phones.
110
- Fix: Premium Countdown browser compatibility issue on Safari and IE11.
111
- Fix: Premium Dual Header horizontal overflow on mobile phones.
112
- - Fix: Premium Modal Box position bug on Safari .
113
- Fix: Premium Video Box video description text with video text switcher off bug.
114
- Fix: Premium Video Box border radius bug on Chrome and Opera.
115
@@ -155,61 +162,61 @@ Premium Addons for Elementor is light weight and we also gave you the control to
155
156
= 2.0 =
157
158
- - Added: Premium Pricing Table widget.
159
- - Added: Premium Button widget.
160
- - Added: Premium Contact Form 7 widget.
161
- - Fixed: Premium Modal Box bugs.
162
- - Fixed: Premium Carousel bugs.
163
- - Fixed: Premium Counter scrolling bug.
164
- - Fixed: Premium Fancy Text cursor text bug.
165
- - Fixed: Premium Progress Bar animation bug.
166
- - Enhanced: Premium Banner widget rewritten.
167
- - Enhanced: Map widget rewritten.
168
- - Enhanced: Premium Blog squares effect.
169
- - Enhanced: Inline Documentations and options usability.
170
171
= 1.09 =
172
173
- - Fixed settings page save issue.
174
175
= 1.08 =
176
177
- - Few minor bug fixes and improvements.
178
179
= 1.07 =
180
181
- - Few minor bug fixes and improvements.
182
183
= 1.06 =
184
185
- - Added: Enhancements in Premium Addons For Elementor Settings Page.
186
187
= 1.05 =
188
189
- - Added: Google Maps API tab in Premium Addons For Elementor Settings Page.
190
- - Few minor bug fixes and improvements.
191
192
= 1.04 =
193
194
- - Few minor bug fixes and improvements.
195
196
= 1.03 =
197
198
- - Added: About tab in Premium Addons For Elementor Settings Page.
199
- - Added System Info tab in Premium Addons For Elementor Settings Page.
200
- - Fix: Google Map bug
201
- - Fix: Carousal bug
202
- - Fix: Dual Header bug
203
- - Few minor bug fixes and improvements.
204
205
= 1.02 =
206
207
- - Few minor bug fixes and improvements.
208
209
= 1.01 =
210
211
- - Few minor bug fixes and improvements.
212
213
= 1.0 =
214
215
- Initial stable realese
79
80
== Changelog ==
81
82
+ = 2.0.9 =
83
+
84
+ - Tweak: Added existing page link option for Premium Pricing Table, Button and Image Button widgets.
85
+ - Tweak: Inline Documentations and options usability.
86
+ - Fix: Premium Banner empty URL redirection bug.
87
+ - Fix: Misspelling CSS property corrected.
88
+
89
= 2.0.8 =
90
91
- Tweak: Amended inline documentation.
92
- Tweak: Changed admin icon.
93
+ - Fix: Premium Banner Custom URL/existing Page bug.
94
+ - Fix: Premium Button hover background color issue.
95
96
= 2.0.7 =
97
98
- Tweak: Added multiple labels option for Premium Progressbar widget.
99
- Tweak: Added inline editing option for all widgets.
100
- Tweak: Added text editor for marker description for Premium Maps widget.
101
+ - Fix: Premium Button empty URL redirection bug.
102
+ - Fix: Premium Image Button empty URL redirection bug.
103
104
= 2.0.6 =
105
106
+ - Fix: Plugin row meta data bug.
107
+ - Fix: Plugin update issue.
108
109
= 2.0.5 =
110
116
- Tweak: Enhanced Premium Blog layout on mobile phones.
117
- Fix: Premium Countdown browser compatibility issue on Safari and IE11.
118
- Fix: Premium Dual Header horizontal overflow on mobile phones.
119
+ - Fix: Premium Modal Box position bug on Safari.
120
- Fix: Premium Video Box video description text with video text switcher off bug.
121
- Fix: Premium Video Box border radius bug on Chrome and Opera.
122
162
163
= 2.0 =
164
165
+ - New: Premium Pricing Table widget.
166
+ - New: Premium Button widget.
167
+ - New: Premium Contact Form 7 widget.
168
+ - Tweak: Premium Banner widget rewritten.
169
+ - Tweak: Map widget rewritten.
170
+ - Tweak: Premium Blog squares effect.
171
+ - Tweak: Inline Documentations and options usability.
172
+ - Fix: Premium Modal Box bugs.
173
+ - Fix: Premium Carousel bugs.
174
+ - Fix: Premium Counter scrolling bug.
175
+ - Fix: Premium Fancy Text cursor text bug.
176
+ - Fix: Premium Progress Bar animation bug.
177
178
= 1.09 =
179
180
+ - Fix: settings page save issue.
181
182
= 1.08 =
183
184
+ - Fix: Minor bugs and improvements.
185
186
= 1.07 =
187
188
+ - Fix: Minor bugs and improvements.
189
190
= 1.06 =
191
192
+ - Tweak: Enhancements in Premium Addons admin settings page.
193
194
= 1.05 =
195
196
+ - Tweak: Google Maps API tab in Premium Addons admin settings page.
197
+ - Fix: Minor bugs and improvements.
198
199
= 1.04 =
200
201
+ - Fix: Minor bugs and improvements.
202
203
= 1.03 =
204
205
+ - New: About tab in Premium Addons admin settings page.
206
+ - New: System Info tab in Premium Addons admin settings page.
207
+ - Fix: Google Map bug.
208
+ - Fix: Carousal bug.
209
+ - Fix: Dual Header bug.
210
+ - Fix: Minor bugs and improvements.
211
212
= 1.02 =
213
214
+ - Fix: Minor bugs and improvements.
215
216
= 1.01 =
217
218
+ - Fix: Minor bugs and improvements.
219
220
= 1.0 =
221
222
+ - Initial stable release
widgets/premium-banner.php CHANGED
@@ -34,14 +34,14 @@ class Premium_Banner_Widget extends Widget_Base {
34
$this->start_controls_section(
35
'premium_banner_global_settings',
36
[
37
- 'label' => esc_html__( 'Premium Banner', 'premium-addons-for-elementor' )
38
]
39
);
40
41
$this->add_control(
42
'premium_banner_image',
43
[
44
- 'label' => esc_html__( 'Premium Banner Image', 'premium-addons-for-elementor' ),
45
'description' => esc_html__( 'Select an image for the Banner', 'premium-addons-for-elementor' ),
46
'type' => Controls_Manager::MEDIA,
47
'default' => [
@@ -51,9 +51,9 @@ class Premium_Banner_Widget extends Widget_Base {
51
]
52
);
53
54
- $this->add_control('premium_banner_link_url_switch',
55
[
56
- 'label' => esc_html__('Banner Link/URL', 'premium-addons-for-elementor'),
57
'type' => Controls_Manager::SWITCHER,
58
]
59
);
@@ -61,7 +61,7 @@ class Premium_Banner_Widget extends Widget_Base {
61
$this->add_control(
62
'premium_banner_image_link_switcher',
63
[
64
- 'label' => esc_html__( 'Banner custom link', 'premium-addons-for-elementor' ),
65
'type' => Controls_Manager::SWITCHER,
66
'default' => '',
67
'description' => esc_html__( 'Add a custom link to the banner', 'premium-addons-for-elementor' ),
@@ -70,39 +70,39 @@ class Premium_Banner_Widget extends Widget_Base {
70
],
71
]
72
);
73
-
74
- $this->add_control(
75
- 'premium_banner_image_existing_page_link',
76
[
77
- 'label' => esc_html__( 'Set Existing Page Link', 'premium-addons-for-elementor' ),
78
- 'type' => Controls_Manager::SELECT,
79
- 'description' => esc_html__( 'Link the banner with an existing page', 'premium-addons-for-elementor' ),
80
'condition' => [
81
- 'premium_banner_image_link_switcher!' => 'yes',
82
'premium_banner_link_url_switch' => 'yes',
83
],
84
- 'options' => $this->getTemplateInstance()->get_all_post()
85
]
86
);
87
88
$this->add_control(
89
- 'premium_banner_image_custom_link',
90
[
91
- 'label' => esc_html__( 'Set custom Link', 'premium-addons-for-elementor' ),
92
- 'type' => Controls_Manager::URL,
93
- 'description' => esc_html__( 'What custom link you want to set to banner?', 'premium-addons-for-elementor' ),
94
'condition' => [
95
- 'premium_banner_image_link_switcher' => 'yes',
96
'premium_banner_link_url_switch' => 'yes',
97
],
98
- 'show_external' => false,
99
]
100
);
101
102
$this->add_control(
103
'premium_banner_image_link_open_new_tab',
104
[
105
- 'label' => esc_html__( 'Open in New Tab', 'premium-addons-for-elementor' ),
106
'type' => Controls_Manager::SWITCHER,
107
'default' => '',
108
'description' => esc_html__( 'Choose if you want the link be opened in a new tab or not', 'premium-addons-for-elementor' ),
@@ -115,10 +115,10 @@ class Premium_Banner_Widget extends Widget_Base {
115
$this->add_control(
116
'premium_banner_image_link_add_nofollow',
117
[
118
- 'label' => esc_html__( 'Add Nofollow Option to Link', 'premium-addons-for-elementor' ),
119
'type' => Controls_Manager::SWITCHER,
120
'default' => '',
121
- 'description' => esc_html__('if you chose yes, the link will not be counted in search engines', 'premium-addons-for-elementor' ),
122
'condition' => [
123
'premium_banner_link_url_switch' => 'yes',
124
],
@@ -128,7 +128,7 @@ class Premium_Banner_Widget extends Widget_Base {
128
$this->add_control(
129
'premium_banner_image_animation',
130
[
131
- 'label' => esc_html__( 'Banner Effects', 'premium-addons-for-elementor' ),
132
'type' => Controls_Manager::SELECT,
133
'default' => 'premium_banner_animation1',
134
'description' => esc_html__( 'Choose a hover effect for the banner', 'premium-addons-for-elementor' ),
@@ -146,7 +146,7 @@ class Premium_Banner_Widget extends Widget_Base {
146
$this->add_control(
147
'premium_banner_height',
148
[
149
- 'label' => esc_html__( 'Banner Height', 'premium-addons-for-elementor' ),
150
'type' => Controls_Manager::SELECT,
151
'default' => 'default',
152
'description' => esc_html__( 'Choose if you want to set a custom height for the banner or keep it as it is', 'premium-addons-for-elementor' ),
@@ -176,7 +176,8 @@ class Premium_Banner_Widget extends Widget_Base {
176
'premium_banner_extra_class',
177
[
178
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
179
- 'type' => Controls_Manager::TEXT
180
]
181
);
182
@@ -186,7 +187,7 @@ class Premium_Banner_Widget extends Widget_Base {
186
$this->start_controls_section(
187
'premium_banner_image_section',
188
[
189
- 'label' => esc_html__( 'Banner Content', 'premium-addons-for-elementor' )
190
]
191
);
192
@@ -205,7 +206,7 @@ class Premium_Banner_Widget extends Widget_Base {
205
$this->add_control(
206
'premium_banner_title_tag',
207
[
208
- 'label' => esc_html__( 'Title HTML Tag', 'premium-addons-for-elementor' ),
209
'description' => esc_html__( 'Select a heading tag for the title. Headings are defined with H1 to H6 tags', 'premium-addons-for-elementor' ),
210
'type' => Controls_Manager::SELECT,
211
'default' => 'h3',
@@ -221,46 +222,6 @@ class Premium_Banner_Widget extends Widget_Base {
221
]
222
);
223
224
- $this->add_control(
225
- 'premium_banner_style2_title_bg',
226
- [
227
- 'label' => esc_html__( 'Title Background', 'premium-addons-for-elementor' ),
228
- 'type' => Controls_Manager::COLOR,
229
- 'default' => '#f2f2f2',
230
- 'description' => esc_html__( 'Choose a background color for the title', 'premium-addons-for-elementor' ),
231
- 'condition' => [
232
- 'premium_banner_image_animation' => 'premium_banner_animation5'
233
- ],
234
- 'selectors' => [
235
- '{{WRAPPER}} .premium_banner_animation5 .premium_addons-banner-ib-desc' => 'background: {{VALUE}};',
236
- ],
237
- 'description_block' => true,
238
- ]
239
- );
240
-
241
- $this->add_control('premium_banner_title_text_align',
242
- [
243
- 'label' => esc_html__('Alignment', 'premium-addons-for-elementor'),
244
- 'type' => Controls_Manager::CHOOSE,
245
- 'options' => [
246
- 'left' => [
247
- 'title' => esc_html__('Left', 'premium-addons-for-elementor'),
248
- 'icon' => 'fa fa-align-left'
249
- ],
250
- 'center' => [
251
- 'title' => esc_html__('Center', 'premium-addons-for-elementor'),
252
- 'icon' => 'fa fa-align-center'
253
- ],
254
- 'right' => [
255
- 'title' => esc_html__('Right', 'premium-addons-for-elementor'),
256
- 'icon' => 'fa fa-align-right'
257
- ],
258
- ],
259
- 'selectors' => [
260
- '{{WRAPPER}} .premium_addons-banner-ib-title ' => 'text-align: {{VALUE}};',
261
- ]
262
- ]
263
- );
264
265
$this->add_control(
266
'premium_banner_description_hint',
@@ -281,9 +242,9 @@ class Premium_Banner_Widget extends Widget_Base {
281
]
282
);
283
284
- $this->add_control('premium_banner_content_text_align',
285
[
286
- 'label' => esc_html__('Description Alignment', 'premium-addons-for-elementor'),
287
'type' => Controls_Manager::CHOOSE,
288
'options' => [
289
'left' => [
@@ -300,31 +261,30 @@ class Premium_Banner_Widget extends Widget_Base {
300
],
301
],
302
'selectors' => [
303
- '{{WRAPPER}} .premium_addons-banner-ib-content' => 'text-align: {{VALUE}};',
304
]
305
]
306
- );
307
-
308
- $this->end_controls_section();
309
310
$this->start_controls_section('premium_banner_responsive_section',
311
[
312
- 'label' => esc_html__('Responsive Settings', 'premium-addons-for-elementor'),
313
]);
314
315
-
316
$this->add_control('premium_banner_responsive_switcher',
317
[
318
'label' => esc_html__('Responsive Controls', 'premium-addons-for-elementor'),
319
'type' => Controls_Manager::SWITCHER,
320
- 'description' => esc_html__('Enabling Responsive Controls will hide the description text for the screen size that is specified', 'premium-addons-for-elementor')
321
]);
322
323
$this->add_control('premium_banner_min_range',
324
[
325
- 'label' => esc_html__('Min Screen Size (PX)', 'premium-addons-for-elementor'),
326
'type' => Controls_Manager::NUMBER,
327
- 'description'=> esc_html__('(Hint: min size for extra small screens is 1px)','premium-addons-for-elementor'),
328
'default' => 1,
329
'condition' => [
330
'premium_banner_responsive_switcher' => 'yes'
@@ -333,9 +293,9 @@ class Premium_Banner_Widget extends Widget_Base {
333
334
$this->add_control('premium_banner_max_range',
335
[
336
- 'label' => esc_html__('Max Screen Size (PX)', 'premium-addons-for-elementor'),
337
'type' => Controls_Manager::NUMBER,
338
- 'description'=> esc_html__('(Hint: max size for extra small screens is 767px)','premium-addons-for-elementor'),
339
'default' => 767,
340
'condition' => [
341
'premium_banner_responsive_switcher' => 'yes'
@@ -370,7 +330,7 @@ class Premium_Banner_Widget extends Widget_Base {
370
$this->add_control(
371
'premium_banner_image_opacity',
372
[
373
- 'label' => esc_html__( 'Opacity', 'premium-addons-for-elementor' ),
374
'type' => Controls_Manager::SLIDER,
375
'default' => [
376
'size' => 1,
@@ -434,6 +394,22 @@ class Premium_Banner_Widget extends Widget_Base {
434
],
435
]
436
);
437
438
$this->add_group_control(
439
Group_Control_Typography::get_type(),
@@ -472,9 +448,9 @@ class Premium_Banner_Widget extends Widget_Base {
472
$this->add_group_control(
473
Group_Control_Typography::get_type(),
474
[
475
- 'name' => 'premium_banner_content_typhography',
476
- 'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
477
- 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
478
]
479
);
480
@@ -520,7 +496,7 @@ class Premium_Banner_Widget extends Widget_Base {
520
</div>
521
</div>
522
<?php
523
- if( !empty( $settings['premium_banner_image_custom_link']['url'] ) || !empty($settings['premium_banner_image_existing_page_link'] ) ) {
524
echo $full_link;
525
}
526
?>
34
$this->start_controls_section(
35
'premium_banner_global_settings',
36
[
37
+ 'label' => esc_html__( 'Image', 'premium-addons-for-elementor' )
38
]
39
);
40
41
$this->add_control(
42
'premium_banner_image',
43
[
44
+ 'label' => esc_html__( 'Upload Image', 'premium-addons-for-elementor' ),
45
'description' => esc_html__( 'Select an image for the Banner', 'premium-addons-for-elementor' ),
46
'type' => Controls_Manager::MEDIA,
47
'default' => [
51
]
52
);
53
54
+ $this->add_control('premium_banner_link_url_switch',
55
[
56
+ 'label' => esc_html__('Link', 'premium-addons-for-elementor'),
57
'type' => Controls_Manager::SWITCHER,
58
]
59
);
61
$this->add_control(
62
'premium_banner_image_link_switcher',
63
[
64
+ 'label' => esc_html__( 'Custom Link', 'premium-addons-for-elementor' ),
65
'type' => Controls_Manager::SWITCHER,
66
'default' => '',
67
'description' => esc_html__( 'Add a custom link to the banner', 'premium-addons-for-elementor' ),
70
],
71
]
72
);
73
+
74
+ $this->add_control(
75
+ 'premium_banner_image_custom_link',
76
[
77
+ 'label' => esc_html__( 'Set custom Link', 'premium-addons-for-elementor' ),
78
+ 'type' => Controls_Manager::URL,
79
+ 'description' => esc_html__( 'What custom link you want to set to banner?', 'premium-addons-for-elementor' ),
80
'condition' => [
81
+ 'premium_banner_image_link_switcher' => 'yes',
82
'premium_banner_link_url_switch' => 'yes',
83
],
84
+ 'show_external' => false,
85
]
86
);
87
88
$this->add_control(
89
+ 'premium_banner_image_existing_page_link',
90
[
91
+ 'label' => esc_html__( 'Existing Page', 'premium-addons-for-elementor' ),
92
+ 'type' => Controls_Manager::SELECT,
93
+ 'description' => esc_html__( 'Link the banner with an existing page', 'premium-addons-for-elementor' ),
94
'condition' => [
95
+ 'premium_banner_image_link_switcher!' => 'yes',
96
'premium_banner_link_url_switch' => 'yes',
97
],
98
+ 'options' => $this->getTemplateInstance()->get_all_post()
99
]
100
);
101
102
$this->add_control(
103
'premium_banner_image_link_open_new_tab',
104
[
105
+ 'label' => esc_html__( 'New Tab', 'premium-addons-for-elementor' ),
106
'type' => Controls_Manager::SWITCHER,
107
'default' => '',
108
'description' => esc_html__( 'Choose if you want the link be opened in a new tab or not', 'premium-addons-for-elementor' ),
115
$this->add_control(
116
'premium_banner_image_link_add_nofollow',
117
[
118
+ 'label' => esc_html__( 'Nofollow Option', 'premium-addons-for-elementor' ),
119
'type' => Controls_Manager::SWITCHER,
120
'default' => '',
121
+ 'description' => esc_html__('if you choose yes, the link will not be counted in search engines', 'premium-addons-for-elementor' ),
122
'condition' => [
123
'premium_banner_link_url_switch' => 'yes',
124
],
128
$this->add_control(
129
'premium_banner_image_animation',
130
[
131
+ 'label' => esc_html__( 'Effect', 'premium-addons-for-elementor' ),
132
'type' => Controls_Manager::SELECT,
133
'default' => 'premium_banner_animation1',
134
'description' => esc_html__( 'Choose a hover effect for the banner', 'premium-addons-for-elementor' ),
146
$this->add_control(
147
'premium_banner_height',
148
[
149
+ 'label' => esc_html__( 'Height', 'premium-addons-for-elementor' ),
150
'type' => Controls_Manager::SELECT,
151
'default' => 'default',
152
'description' => esc_html__( 'Choose if you want to set a custom height for the banner or keep it as it is', 'premium-addons-for-elementor' ),
176
'premium_banner_extra_class',
177
[
178
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
179
+ 'type' => Controls_Manager::TEXT,
180
+ 'description' => esc_html__( 'Add extra class name that will be applied to the banner, and you can use this class for your customizations.', 'premium-addons-for-elementor' ),
181
]
182
);
183
187
$this->start_controls_section(
188
'premium_banner_image_section',
189
[
190
+ 'label' => esc_html__( 'Content', 'premium-addons-for-elementor' )
191
]
192
);
193
206
$this->add_control(
207
'premium_banner_title_tag',
208
[
209
+ 'label' => esc_html__( 'HTML Tag', 'premium-addons-for-elementor' ),
210
'description' => esc_html__( 'Select a heading tag for the title. Headings are defined with H1 to H6 tags', 'premium-addons-for-elementor' ),
211
'type' => Controls_Manager::SELECT,
212
'default' => 'h3',
222
]
223
);
224
225
226
$this->add_control(
227
'premium_banner_description_hint',
242
]
243
);
244
245
+ $this->add_control('premium_banner_title_text_align',
246
[
247
+ 'label' => esc_html__('Alignment', 'premium-addons-for-elementor'),
248
'type' => Controls_Manager::CHOOSE,
249
'options' => [
250
'left' => [
261
],
262
],
263
'selectors' => [
264
+ '{{WRAPPER}} .premium_addons-banner-ib-title, {{WRAPPER}} .premium_addons-banner-ib-content' => 'text-align: {{VALUE}};',
265
]
266
]
267
+ );
268
+
269
+ $this->end_controls_section();
270
271
$this->start_controls_section('premium_banner_responsive_section',
272
[
273
+ 'label' => esc_html__('Responsive', 'premium-addons-for-elementor'),
274
]);
275
276
$this->add_control('premium_banner_responsive_switcher',
277
[
278
'label' => esc_html__('Responsive Controls', 'premium-addons-for-elementor'),
279
'type' => Controls_Manager::SWITCHER,
280
+ 'description' => esc_html__('If the description text is not suiting well on specific screen sizes, you may enable this option which will hide the description text.', 'premium-addons-for-elementor')
281
]);
282
283
$this->add_control('premium_banner_min_range',
284
[
285
+ 'label' => esc_html__('Minimum Size', 'premium-addons-for-elementor'),
286
'type' => Controls_Manager::NUMBER,
287
+ 'description'=> esc_html__('Note: minimum size for extra small screens is 1px.','premium-addons-for-elementor'),
288
'default' => 1,
289
'condition' => [
290
'premium_banner_responsive_switcher' => 'yes'
293
294
$this->add_control('premium_banner_max_range',
295
[
296
+ 'label' => esc_html__('Maximum Size', 'premium-addons-for-elementor'),
297
'type' => Controls_Manager::NUMBER,
298
+ 'description'=> esc_html__('Note: maximum size for extra small screens is 767px.','premium-addons-for-elementor'),
299
'default' => 767,
300
'condition' => [
301
'premium_banner_responsive_switcher' => 'yes'
330
$this->add_control(
331
'premium_banner_image_opacity',
332
[
333
+ 'label' => esc_html__( 'Image Opacity', 'premium-addons-for-elementor' ),
334
'type' => Controls_Manager::SLIDER,
335
'default' => [
336
'size' => 1,
394
],
395
]
396
);
397
+
398
+ $this->add_control(
399
+ 'premium_banner_style2_title_bg',
400
+ [
401
+ 'label' => esc_html__( 'Title Background', 'premium-addons-for-elementor' ),
402
+ 'type' => Controls_Manager::COLOR,
403
+ 'default' => '#f2f2f2',
404
+ 'description' => esc_html__( 'Choose a background color for the title', 'premium-addons-for-elementor' ),
405
+ 'condition' => [
406
+ 'premium_banner_image_animation' => 'premium_banner_animation5'
407
+ ],
408
+ 'selectors' => [
409
+ '{{WRAPPER}} .premium_banner_animation5 .premium_addons-banner-ib-desc' => 'background: {{VALUE}};',
410
+ ],
411
+ ]
412
+ );
413
414
$this->add_group_control(
415
Group_Control_Typography::get_type(),
448
$this->add_group_control(
449
Group_Control_Typography::get_type(),
450
[
451
+ 'name' => 'premium_banner_content_typhography',
452
+ 'selector' => '{{WRAPPER}} .premium_banner .premium_banner_content',
453
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
454
]
455
);
456
496
</div>
497
</div>
498
<?php
499
+ if( $settings['premium_banner_link_url_switch'] == 'yes' && (!empty( $settings['premium_banner_image_custom_link']['url'] ) || !empty($settings['premium_banner_image_existing_page_link'] )) ) {
500
echo $full_link;
501
}
502
?>
widgets/premium-blog.php CHANGED
@@ -32,14 +32,14 @@ class Premium_Blog_Widget extends Widget_Base
32
/* Start Content Section */
33
$this->start_controls_section('premium_blog_general_settings',
34
[
35
- 'label' => esc_html__('Thumbnail Settings', 'premium-addons-for-elementor'),
36
]
37
);
38
39
/*Hover Image Effect*/
40
$this->add_control('premium_blog_hover_image_effect',
41
[
42
- 'label' => esc_html__('Image Hover Effect', 'premium-addons-for-elementor'),
43
'type' => Controls_Manager::SELECT,
44
'description' => esc_html__('Choose a hover effect for the image','premium-addons-for-elementor'),
45
'options' => [
@@ -57,7 +57,7 @@ class Premium_Blog_Widget extends Widget_Base
57
/*Hover Image Effect*/
58
$this->add_control('premium_blog_hover_color_effect',
59
[
60
- 'label' => esc_html__('Color Hover Effect', 'premium-addons-for-elementor'),
61
'type' => Controls_Manager::SELECT,
62
'description' => esc_html__('Choose an overlay color effect','premium-addons-for-elementor'),
63
'options' => [
@@ -78,20 +78,10 @@ class Premium_Blog_Widget extends Widget_Base
78
/*Start Content Settings Section*/
79
$this->start_controls_section('premium_blog_content_settings',
80
[
81
- 'label' => esc_html__('Content Settings', 'premium-addons-for-elementor'),
82
]
83
);
84
85
-
86
- /*Post Format Icon*/
87
- $this->add_control('premium_blog_post_format_icon',
88
- [
89
- 'label' => esc_html__( 'Post Format Icon', 'essential-addons-elementor' ),
90
- 'type' => Controls_Manager::SWITCHER,
91
- 'default' => 'yes',
92
- ]
93
- );
94
-
95
/*Categories Filter*/
96
$this->add_control('premium_blog_categories',
97
[
@@ -114,7 +104,6 @@ class Premium_Blog_Widget extends Widget_Base
114
]
115
);
116
117
-
118
/*Excerpt Length*/
119
$this->add_control('premium_blog_excerpt_length',
120
[
@@ -137,7 +126,6 @@ class Premium_Blog_Widget extends Widget_Base
137
]
138
);
139
140
-
141
/*Date Meta*/
142
$this->add_control('premium_blog_date_meta',
143
[
@@ -177,10 +165,19 @@ class Premium_Blog_Widget extends Widget_Base
177
]
178
);
179
180
/*Edit Post Meta*/
181
$this->add_control('premium_blog_edit_post',
182
[
183
- 'label' => esc_html__('Edit Post', 'premium-addons-for-elementor'),
184
'type' => Controls_Manager::SWITCHER,
185
'description' => esc_html__('Display or hide edit post option','premium-addons-for-elementor'),
186
'default' => 'yes',
@@ -222,7 +219,7 @@ class Premium_Blog_Widget extends Widget_Base
222
/*Front Text Align*/
223
$this->add_responsive_control('premium_flip_text_align',
224
[
225
- 'label' => esc_html__( 'Text Align', 'elementor' ),
226
'type' => Controls_Manager::CHOOSE,
227
'options' => [
228
'left' => [
@@ -260,7 +257,7 @@ class Premium_Blog_Widget extends Widget_Base
260
/*Plus Icon Color*/
261
$this->add_control('premium_blog_plus_color',
262
[
263
- 'label' => esc_html__('Plus Icon Color', 'premium-addons-for-elementor'),
264
'type' => Controls_Manager::COLOR,
265
'scheme' => [
266
'type' => Scheme_Color::get_type(),
@@ -330,6 +327,15 @@ class Premium_Blog_Widget extends Widget_Base
330
]
331
);
332
333
/*Titles Hover Color*/
334
$this->add_control('premium_blog_title_hover_color',
335
[
@@ -345,15 +351,6 @@ class Premium_Blog_Widget extends Widget_Base
345
]
346
);
347
348
- $this->add_group_control(
349
- Group_Control_Typography::get_type(),
350
- [
351
- 'name' => 'premium_blog_title_typo',
352
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
353
- 'selector' => '{{WRAPPER}} .premium-blog-entry-title a',
354
- ]
355
- );
356
-
357
$this->end_controls_section();
358
359
$this->start_controls_section('premium_blog_meta_style_section',
@@ -378,6 +375,16 @@ class Premium_Blog_Widget extends Widget_Base
378
]
379
);
380
381
/*Meta Hover Color*/
382
$this->add_control('premium_blog_meta_hover_color',
383
[
@@ -393,15 +400,6 @@ class Premium_Blog_Widget extends Widget_Base
393
]
394
);
395
396
- $this->add_group_control(
397
- Group_Control_Typography::get_type(),
398
- [
399
- 'name' => 'premium_blog_meta_typo',
400
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
401
- 'selector' => '{{WRAPPER}} .premium-blog-entry-meta a',
402
- ]
403
- );
404
-
405
$this->end_controls_section();
406
407
$this->start_controls_section('premium_blog_content_style_section',
@@ -414,7 +412,7 @@ class Premium_Blog_Widget extends Widget_Base
414
/*Post Content Color*/
415
$this->add_control('premium_blog_post_content_color',
416
[
417
- 'label' => esc_html__('Post Content Color', 'premium-addons-for-elementor'),
418
'type' => Controls_Manager::COLOR,
419
'scheme' => [
420
'type' => Scheme_Color::get_type(),
@@ -473,6 +471,16 @@ class Premium_Blog_Widget extends Widget_Base
473
]
474
);
475
476
/*Tags Hover Color*/
477
$this->add_control('premium_blog_tags_hoer_color',
478
[
@@ -488,16 +496,6 @@ class Premium_Blog_Widget extends Widget_Base
488
]
489
);
490
491
- /*Tags Typography*/
492
- $this->add_group_control(
493
- Group_Control_Typography::get_type(),
494
- [
495
- 'name' => 'premium_blog_tags_typo',
496
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
497
- 'selector' => '{{WRAPPER}} .premium-blog-post-tags-container a',
498
- ]
499
- );
500
-
501
$this->end_controls_section();
502
503
/*Post Format Icon*/
@@ -508,6 +506,25 @@ class Premium_Blog_Widget extends Widget_Base
508
]
509
);
510
511
/*Post Format Icon Color*/
512
$this->add_control('premium_blog_format_icon_color',
513
[
@@ -538,25 +555,6 @@ class Premium_Blog_Widget extends Widget_Base
538
]
539
);
540
541
- $this->add_control('premium_blog_format_icon_size',
542
- [
543
- 'label' => esc_html__('Size', 'premium-addons-for-elementor'),
544
- 'type' => Controls_Manager::SLIDER,
545
- 'description' => esc_html__('Choose icon size in (PX, EM)', 'premium-addons-for-elementor'),
546
- 'range' => [
547
- 'em' => [
548
- 'min' => 1,
549
- 'max' => 10,
550
- ],
551
- ],
552
- 'size_units' => ['px', "em"],
553
- 'label_block' => true,
554
- 'selectors' => [
555
- '{{WRAPPER}} .premium-blog-format-icon' => 'font-size: {{SIZE}}{{UNIT}};',
556
- ]
557
- ]
558
- );
559
-
560
/*Post Format Background Color*/
561
$this->add_control('premium_blog_format_back_color',
562
[
@@ -809,4 +807,4 @@ if(count($posts)){
809
<?php
810
}
811
}
812
- Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
32
/* Start Content Section */
33
$this->start_controls_section('premium_blog_general_settings',
34
[
35
+ 'label' => esc_html__('Image', 'premium-addons-for-elementor'),
36
]
37
);
38
39
/*Hover Image Effect*/
40
$this->add_control('premium_blog_hover_image_effect',
41
[
42
+ 'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
43
'type' => Controls_Manager::SELECT,
44
'description' => esc_html__('Choose a hover effect for the image','premium-addons-for-elementor'),
45
'options' => [
57
/*Hover Image Effect*/
58
$this->add_control('premium_blog_hover_color_effect',
59
[
60
+ 'label' => esc_html__('Color Effect', 'premium-addons-for-elementor'),
61
'type' => Controls_Manager::SELECT,
62
'description' => esc_html__('Choose an overlay color effect','premium-addons-for-elementor'),
63
'options' => [
78
/*Start Content Settings Section*/
79
$this->start_controls_section('premium_blog_content_settings',
80
[
81
+ 'label' => esc_html__('Content', 'premium-addons-for-elementor'),
82
]
83
);
84
85
/*Categories Filter*/
86
$this->add_control('premium_blog_categories',
87
[
104
]
105
);
106
107
/*Excerpt Length*/
108
$this->add_control('premium_blog_excerpt_length',
109
[
126
]
127
);
128
129
/*Date Meta*/
130
$this->add_control('premium_blog_date_meta',
131
[
165
]
166
);
167
168
+ /*Post Format Icon*/
169
+ $this->add_control('premium_blog_post_format_icon',
170
+ [
171
+ 'label' => esc_html__( 'Post Format Icon', 'essential-addons-elementor' ),
172
+ 'type' => Controls_Manager::SWITCHER,
173
+ 'default' => 'yes',
174
+ ]
175
+ );
176
+
177
/*Edit Post Meta*/
178
$this->add_control('premium_blog_edit_post',
179
[
180
+ 'label' => esc_html__('Edit Post Icon', 'premium-addons-for-elementor'),
181
'type' => Controls_Manager::SWITCHER,
182
'description' => esc_html__('Display or hide edit post option','premium-addons-for-elementor'),
183
'default' => 'yes',
219
/*Front Text Align*/
220
$this->add_responsive_control('premium_flip_text_align',
221
[
222
+ 'label' => esc_html__( 'Alignment', 'elementor' ),
223
'type' => Controls_Manager::CHOOSE,
224
'options' => [
225
'left' => [
257
/*Plus Icon Color*/
258
$this->add_control('premium_blog_plus_color',
259
[
260
+ 'label' => esc_html__('Icon Color', 'premium-addons-for-elementor'),
261
'type' => Controls_Manager::COLOR,
262
'scheme' => [
263
'type' => Scheme_Color::get_type(),
327
]
328
);
329
330
+ $this->add_group_control(
331
+ Group_Control_Typography::get_type(),
332
+ [
333
+ 'name' => 'premium_blog_title_typo',
334
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
335
+ 'selector' => '{{WRAPPER}} .premium-blog-entry-title a',
336
+ ]
337
+ );
338
+
339
/*Titles Hover Color*/
340
$this->add_control('premium_blog_title_hover_color',
341
[
351
]
352
);
353
354
$this->end_controls_section();
355
356
$this->start_controls_section('premium_blog_meta_style_section',
375
]
376
);
377
378
+
379
+ $this->add_group_control(
380
+ Group_Control_Typography::get_type(),
381
+ [
382
+ 'name' => 'premium_blog_meta_typo',
383
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
384
+ 'selector' => '{{WRAPPER}} .premium-blog-entry-meta a',
385
+ ]
386
+ );
387
+
388
/*Meta Hover Color*/
389
$this->add_control('premium_blog_meta_hover_color',
390
[
400
]
401
);
402
403
$this->end_controls_section();
404
405
$this->start_controls_section('premium_blog_content_style_section',
412
/*Post Content Color*/
413
$this->add_control('premium_blog_post_content_color',
414
[
415
+ 'label' => esc_html__('Color', 'premium-addons-for-elementor'),
416
'type' => Controls_Manager::COLOR,
417
'scheme' => [
418
'type' => Scheme_Color::get_type(),
471
]
472
);
473
474
+ /*Tags Typography*/
475
+ $this->add_group_control(
476
+ Group_Control_Typography::get_type(),
477
+ [
478
+ 'name' => 'premium_blog_tags_typo',
479
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
480
+ 'selector' => '{{WRAPPER}} .premium-blog-post-tags-container a',
481
+ ]
482
+ );
483
+
484
/*Tags Hover Color*/
485
$this->add_control('premium_blog_tags_hoer_color',
486
[
496
]
497
);
498
499
$this->end_controls_section();
500
501
/*Post Format Icon*/
506
]
507
);
508
509
+ $this->add_control('premium_blog_format_icon_size',
510
+ [
511
+ 'label' => esc_html__('Size', 'premium-addons-for-elementor'),
512
+ 'type' => Controls_Manager::SLIDER,
513
+ 'description' => esc_html__('Choose icon size in (PX, EM)', 'premium-addons-for-elementor'),
514
+ 'range' => [
515
+ 'em' => [
516
+ 'min' => 1,
517
+ 'max' => 10,
518
+ ],
519
+ ],
520
+ 'size_units' => ['px', "em"],
521
+ 'label_block' => true,
522
+ 'selectors' => [
523
+ '{{WRAPPER}} .premium-blog-format-icon' => 'font-size: {{SIZE}}{{UNIT}};',
524
+ ]
525
+ ]
526
+ );
527
+
528
/*Post Format Icon Color*/
529
$this->add_control('premium_blog_format_icon_color',
530
[
555
]
556
);
557
558
/*Post Format Background Color*/
559
$this->add_control('premium_blog_format_back_color',
560
[
807
<?php
808
}
809
}
810
+ Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
widgets/premium-button.php CHANGED
@@ -8,6 +8,10 @@ class Premium_Button_Widget extends Widget_Base
8
public function get_name() {
9
return 'premium-addon-button';
10
}
11
12
public function get_title() {
13
return esc_html__('Premium Button', 'premium-addons-for-elementor');
@@ -28,23 +32,36 @@ class Premium_Button_Widget extends Widget_Base
28
/*Start Button Content Section */
29
$this->start_controls_section('premium_button_general_section',
30
[
31
- 'label' => esc_html__('Button Settings', 'premium-addons-for-elementor'),
32
]
33
);
34
35
/*Button Text*/
36
$this->add_control('premium_button_text',
37
[
38
- 'label' => esc_html__('Button Text', 'premium-addons-for-elementor'),
39
'type' => Controls_Manager::TEXT,
40
'default' => esc_html__('Click Me','premium-addons-for-elementor'),
41
'label_block' => true,
42
]
43
);
44
45
$this->add_control('premium_button_link',
46
[
47
- 'label' => esc_html__('URL', 'premium-addons-for-elementor'),
48
'type' => Controls_Manager::URL,
49
'default' => [
50
'url' => '#',
@@ -52,13 +69,29 @@ class Premium_Button_Widget extends Widget_Base
52
'placeholder' => 'https://premiumaddons.com/',
53
'label_block' => true,
54
'separator' => 'after',
55
]
56
);
57
58
/*Button Hover Effect*/
59
$this->add_control('premium_button_hover_effect',
60
[
61
- 'label' => esc_html__('Button Hover Effect', 'premium-addons-for-elementor'),
62
'type' => Controls_Manager::SELECT,
63
'default' => 'none',
64
'options' => [
@@ -154,7 +187,7 @@ class Premium_Button_Widget extends Widget_Base
154
/*Button Icon Switcher*/
155
$this->add_control('premium_button_icon_switcher',
156
[
157
- 'label' => esc_html__('Button Icon', 'premium-addons-for-elementor'),
158
'type' => Controls_Manager::SWITCHER,
159
'condition' => [
160
'premium_button_hover_effect!' => 'style4'
@@ -317,7 +350,7 @@ class Premium_Button_Widget extends Widget_Base
317
/*Button Size*/
318
$this->add_control('premium_button_size',
319
[
320
- 'label' => esc_html__('Button Size', 'premium-addons-for-elementor'),
321
'type' => Controls_Manager::SELECT,
322
'default' => 'lg',
323
'options' => [
@@ -334,7 +367,7 @@ class Premium_Button_Widget extends Widget_Base
334
/*Button Align*/
335
$this->add_responsive_control('premium_button_align',
336
[
337
- 'label' => __( 'Button Alignment', 'elementor' ),
338
'type' => Controls_Manager::CHOOSE,
339
'options' => [
340
'left' => [
@@ -359,7 +392,7 @@ class Premium_Button_Widget extends Widget_Base
359
360
$this->add_control('premium_button_event_switcher',
361
[
362
- 'label' => esc_html__('Button onclick Event', 'premium-addons-for-elementor'),
363
'type' => Controls_Manager::SWITCHER,
364
'separator' => 'before',
365
]
@@ -468,28 +501,6 @@ class Premium_Button_Widget extends Widget_Base
468
]
469
);
470
471
- /*Button Margin*/
472
- $this->add_responsive_control('premium_button_margin_normal',
473
- [
474
- 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
475
- 'type' => Controls_Manager::DIMENSIONS,
476
- 'size_units' => ['px', 'em', '%'],
477
- 'selectors' => [
478
- '{{WRAPPER}} .premium-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
479
- ]
480
- ]);
481
-
482
- /*Button Padding*/
483
- $this->add_responsive_control('premium_button_padding_normal',
484
- [
485
- 'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
486
- 'type' => Controls_Manager::DIMENSIONS,
487
- 'size_units' => ['px', 'em', '%'],
488
- 'selectors' => [
489
- '{{WRAPPER}} .premium-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
490
- ]
491
- ]);
492
-
493
/*Icon Shadow*/
494
$this->add_group_control(
495
Group_Control_Text_Shadow::get_type(),
@@ -524,6 +535,28 @@ class Premium_Button_Widget extends Widget_Base
524
]
525
);
526
527
$this->end_controls_tab();
528
529
$this->start_controls_tab('premium_button_style_hover',
@@ -617,28 +650,6 @@ class Premium_Button_Widget extends Widget_Base
617
]
618
);
619
620
- /*Button Margin*/
621
- $this->add_responsive_control('premium_button_margin_hover',
622
- [
623
- 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
624
- 'type' => Controls_Manager::DIMENSIONS,
625
- 'size_units' => ['px', 'em', '%'],
626
- 'selectors' => [
627
- '{{WRAPPER}} .premium-button:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
628
- ]
629
- ]);
630
-
631
- /*Button Padding*/
632
- $this->add_responsive_control('premium_button_padding_hover',
633
- [
634
- 'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
635
- 'type' => Controls_Manager::DIMENSIONS,
636
- 'size_units' => ['px', 'em', '%'],
637
- 'selectors' => [
638
- '{{WRAPPER}} .premium-button:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
639
- ]
640
- ]);
641
-
642
/*Icon Shadow*/
643
$this->add_group_control(
644
Group_Control_Text_Shadow::get_type(),
@@ -678,7 +689,6 @@ class Premium_Button_Widget extends Widget_Base
678
]
679
);
680
681
-
682
/*Button Shadow*/
683
$this->add_group_control(
684
Group_Control_Box_Shadow::get_type(),
@@ -689,6 +699,28 @@ class Premium_Button_Widget extends Widget_Base
689
]
690
);
691
692
$this->end_controls_tab();
693
694
$this->end_controls_tabs();
@@ -706,7 +738,12 @@ class Premium_Button_Widget extends Widget_Base
706
707
$button_text = $settings['premium_button_text'];
708
709
- $button_url = $settings['premium_button_link']['url'];
710
711
$button_size = 'premium-button-' . $settings['premium_button_size'];
712
8
public function get_name() {
9
return 'premium-addon-button';
10
}
11
+
12
+ public function getTemplateInstance() {
13
+ return $this->templateInstance = premium_Template_Tags::getInstance();
14
+ }
15
16
public function get_title() {
17
return esc_html__('Premium Button', 'premium-addons-for-elementor');
32
/*Start Button Content Section */
33
$this->start_controls_section('premium_button_general_section',
34
[
35
+ 'label' => esc_html__('Button', 'premium-addons-for-elementor'),
36
]
37
);
38
39
/*Button Text*/
40
$this->add_control('premium_button_text',
41
[
42
+ 'label' => esc_html__('Text', 'premium-addons-for-elementor'),
43
'type' => Controls_Manager::TEXT,
44
'default' => esc_html__('Click Me','premium-addons-for-elementor'),
45
'label_block' => true,
46
]
47
);
48
49
+ $this->add_control('premium_button_link_selection',
50
+ [
51
+ 'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
52
+ 'type' => Controls_Manager::SELECT,
53
+ 'options' => [
54
+ 'url' => esc_html__('URL', 'premium-addons-for-elementor'),
55
+ 'link' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
56
+ ],
57
+ 'default' => 'url',
58
+ 'label_block' => true,
59
+ ]
60
+ );
61
+
62
$this->add_control('premium_button_link',
63
[
64
+ 'label' => esc_html__('Link', 'premium-addons-for-elementor'),
65
'type' => Controls_Manager::URL,
66
'default' => [
67
'url' => '#',
69
'placeholder' => 'https://premiumaddons.com/',
70
'label_block' => true,
71
'separator' => 'after',
72
+ 'condition' => [
73
+ 'premium_button_link_selection' => 'url'
74
+ ]
75
+ ]
76
+ );
77
+
78
+ $this->add_control('premium_button_existing_link',
79
+ [
80
+ 'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
81
+ 'type' => Controls_Manager::SELECT,
82
+ 'options' => $this->getTemplateInstance()->get_all_post(),
83
+ 'condition' => [
84
+ 'premium_button_link_selection' => 'link',
85
+ ],
86
+ 'separator' => 'after',
87
+ 'label_block' => true,
88
]
89
);
90
91
/*Button Hover Effect*/
92
$this->add_control('premium_button_hover_effect',
93
[
94
+ 'label' => esc_html__('Hover Effect', 'premium-addons-for-elementor'),
95
'type' => Controls_Manager::SELECT,
96
'default' => 'none',
97
'options' => [
187
/*Button Icon Switcher*/
188
$this->add_control('premium_button_icon_switcher',
189
[
190
+ 'label' => esc_html__('Icon', 'premium-addons-for-elementor'),
191
'type' => Controls_Manager::SWITCHER,
192
'condition' => [
193
'premium_button_hover_effect!' => 'style4'
350
/*Button Size*/
351
$this->add_control('premium_button_size',
352
[
353
+ 'label' => esc_html__('Size', 'premium-addons-for-elementor'),
354
'type' => Controls_Manager::SELECT,
355
'default' => 'lg',
356
'options' => [
367
/*Button Align*/
368
$this->add_responsive_control('premium_button_align',
369
[
370
+ 'label' => esc_html__( 'Alignment', 'elementor' ),
371
'type' => Controls_Manager::CHOOSE,
372
'options' => [
373
'left' => [
392
393
$this->add_control('premium_button_event_switcher',
394
[
395
+ 'label' => esc_html__('onclick Event', 'premium-addons-for-elementor'),
396
'type' => Controls_Manager::SWITCHER,
397
'separator' => 'before',
398
]
501
]
502
);
503
504
/*Icon Shadow*/
505
$this->add_group_control(
506
Group_Control_Text_Shadow::get_type(),
535
]
536
);
537
538
+ /*Button Margin*/
539
+ $this->add_responsive_control('premium_button_margin_normal',
540
+ [
541
+ 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
542
+ 'type' => Controls_Manager::DIMENSIONS,
543
+ 'size_units' => ['px', 'em', '%'],
544
+ 'selectors' => [
545
+ '{{WRAPPER}} .premium-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
546
+ ]
547
+ ]);
548
+
549
+ /*Button Padding*/
550
+ $this->add_responsive_control('premium_button_padding_normal',
551
+ [
552
+ 'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
553
+ 'type' => Controls_Manager::DIMENSIONS,
554
+ 'size_units' => ['px', 'em', '%'],
555
+ 'selectors' => [
556
+ '{{WRAPPER}} .premium-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
557
+ ]
558
+ ]);
559
+
560
$this->end_controls_tab();
561
562
$this->start_controls_tab('premium_button_style_hover',
650
]
651
);
652
653
/*Icon Shadow*/
654
$this->add_group_control(
655
Group_Control_Text_Shadow::get_type(),
689
]
690
);
691
692
/*Button Shadow*/
693
$this->add_group_control(
694
Group_Control_Box_Shadow::get_type(),
699
]
700
);
701
702
+ /*Button Margin*/
703
+ $this->add_responsive_control('premium_button_margin_hover',
704
+ [
705
+ 'label' => esc_html__('Margin', 'premium-addons-for-elementor'),
706
+ 'type' => Controls_Manager::DIMENSIONS,
707
+ 'size_units' => ['px', 'em', '%'],
708
+ 'selectors' => [
709
+ '{{WRAPPER}} .premium-button:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
710
+ ]
711
+ ]);
712
+
713
+ /*Button Padding*/
714
+ $this->add_responsive_control('premium_button_padding_hover',
715
+ [
716
+ 'label' => esc_html__('Padding', 'premium-addons-for-elementor'),
717
+ 'type' => Controls_Manager::DIMENSIONS,
718
+ 'size_units' => ['px', 'em', '%'],
719
+ 'selectors' => [
720
+ '{{WRAPPER}} .premium-button:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
721
+ ]
722
+ ]);
723
+
724
$this->end_controls_tab();
725
726
$this->end_controls_tabs();
738
739
$button_text = $settings['premium_button_text'];
740
741
+ if($settings['premium_button_link_selection'] == 'url'){
742
+ $button_url = $settings['premium_button_link']['url'];
743
+ } else {
744
+ $button_url = get_permalink($settings['premium_button_existing_link']);
745
+ }
746
+
747
748
$button_size = 'premium-button-' . $settings['premium_button_size'];
749
widgets/premium-carousel.php CHANGED
@@ -40,16 +40,16 @@ class Premium_Carousel_Widget extends Widget_Base {
40
// This will controls the animation, colors and background, dimensions etc
41
protected function _register_controls() {
42
$this->start_controls_section(
43
- 'premium-carousel-global-settings',
44
[
45
- 'label' => esc_html__( 'Carousel Settings' , 'premium-addons-for-elementor' )
46
]
47
);
48
49
$this->add_control(
50
'premium_carousel_slider_content',
51
[
52
- 'label' => esc_html__( 'Slider Content', 'premium-addons-for-elementor' ),
53
'description' => esc_html__( 'Slider content is a template which you can choose from Elementor library. Each template will be a slider content', 'premium-addons-for-elementor' ),
54
'type' => Controls_Manager::SELECT2,
55
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
@@ -61,7 +61,7 @@ class Premium_Carousel_Widget extends Widget_Base {
61
$this->add_control(
62
'premium_carousel_slider_type',
63
[
64
- 'label' => esc_html__( 'Slider Type', 'premium-addons-for-elementor' ),
65
'description' => esc_html__( 'Set a navigation type', 'premium-addons-for-elementor' ),
66
'type' => Controls_Manager::SELECT,
67
'default' => 'horizontal',
@@ -75,7 +75,7 @@ class Premium_Carousel_Widget extends Widget_Base {
75
$this->add_control(
76
'premium_carousel_slides_to_show',
77
[
78
- 'label' => esc_html__( 'Slides to Scroll', 'premium-addons-for-elementor' ),
79
'type' => Controls_Manager::SELECT,
80
'default' => 'all',
81
'options' => [
@@ -88,7 +88,7 @@ class Premium_Carousel_Widget extends Widget_Base {
88
$this->add_control(
89
'premium_carousel_responsive_desktop',
90
[
91
- 'label' => esc_html__( 'Slides on Desktop', 'premium-addons-for-elementor' ),
92
'type' => Controls_Manager::NUMBER,
93
'default' => 5
94
]
@@ -97,7 +97,7 @@ class Premium_Carousel_Widget extends Widget_Base {
97
$this->add_control(
98
'premium_carousel_responsive_tabs',
99
[
100
- 'label' => esc_html__( 'Slides on Tabs', 'premium-addons-for-elementor' ),
101
'type' => Controls_Manager::NUMBER,
102
'default' => 3
103
]
@@ -106,12 +106,21 @@ class Premium_Carousel_Widget extends Widget_Base {
106
$this->add_control(
107
'premium_carousel_responsive_mobile',
108
[
109
- 'label' => esc_html__( 'Slides on Mobile', 'premium-addons-for-elementor' ),
110
'type' => Controls_Manager::NUMBER,
111
'default' => 2
112
]
113
);
114
115
$this->add_control(
116
'premium_carousel_loop',
117
[
@@ -135,7 +144,7 @@ class Premium_Carousel_Widget extends Widget_Base {
135
$this->add_control(
136
'premium_carousel_autoplay',
137
[
138
- 'label' => esc_html__( 'AutoPlay Slides‏', 'premium-addons-for-elementor' ),
139
'description' => esc_html__( 'Slide will start automatically', 'premium-addons-for-elementor' ),
140
'type' => Controls_Manager::SWITCHER,
141
'default' => 'yes'
@@ -145,8 +154,8 @@ class Premium_Carousel_Widget extends Widget_Base {
145
$this->add_control(
146
'premium_carousel_autoplay_speed',
147
[
148
- 'label' => esc_html__( 'AutoPlay Speed', 'premium-addons-for-elementor' ),
149
- 'description' => esc_html__( 'AutoPlay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
150
'type' => Controls_Manager::NUMBER,
151
'default' => 5000,
152
'condition' => [
@@ -167,7 +176,8 @@ class Premium_Carousel_Widget extends Widget_Base {
167
'premium_carousel_extra_class',
168
[
169
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
170
- 'type' => Controls_Manager::TEXT
171
]
172
);
173
@@ -180,160 +190,27 @@ class Premium_Carousel_Widget extends Widget_Base {
180
'tab' => Controls_Manager::TAB_STYLE
181
]
182
);
183
184
$this->add_control(
185
'premium_carousel_navigation_show',
186
[
187
- 'label' => esc_html__( 'Navigation Arrows', 'premium-addons-for-elementor' ),
188
'description' => esc_html__( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
189
'type' => Controls_Manager::SWITCHER,
190
'default' => 'yes'
191
]
192
);
193
-
194
- $this->add_control(
195
- 'premium_carousel_arrow_style',
196
- [
197
- 'label' => esc_html__( 'Arrow Style', 'premium-addons-for-elementor' ),
198
- 'type' => Controls_Manager::SELECT,
199
- 'default' => 'default',
200
- 'options' => [
201
- 'default' => esc_html__( 'Default', 'premium-addons-for-elementor' ),
202
- 'circle-bg' => esc_html__( 'Circle Background', 'premium-addons-for-elementor' ),
203
- 'square-bg' => esc_html__( 'Square Background', 'premium-addons-for-elementor' ),
204
- 'circle-border' => esc_html__( 'Circle border', 'premium-addons-for-elementor' ),
205
- 'square-border' => esc_html__( 'Square border', 'premium-addons-for-elementor' ),
206
- ],
207
- 'condition' => [
208
- 'premium_carousel_navigation_show' => 'yes'
209
- ]
210
- ]
211
- );
212
-
213
- $this->add_control(
214
- 'premium_carousel_arrow_bg_color',
215
- [
216
- 'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
217
- 'type' => Controls_Manager::COLOR,
218
- 'scheme' => [
219
- 'type' => Scheme_Color::get_type(),
220
- 'value' => Scheme_Color::COLOR_1,
221
- ],
222
- 'condition' => [
223
- 'premium_carousel_arrow_style' => [ 'circle-bg', 'square-bg' ]
224
- ],
225
- 'selectors' => [
226
- '{{WRAPPER}} .premium-carousel-wrapper .circle-bg' => 'background: {{VALUE}};',
227
- '{{WRAPPER}} .premium-carousel-wrapper .square-bg' => 'background: {{VALUE}};',
228
- ],
229
- ]
230
- );
231
-
232
- $this->add_control(
233
- 'premium_carousel_arrow_border_color',
234
- [
235
- 'label' => esc_html__( 'Border Color', 'premium-addons-for-elementor' ),
236
- 'type' => Controls_Manager::COLOR,
237
- 'scheme' => [
238
- 'type' => Scheme_Color::get_type(),
239
- 'value' => Scheme_Color::COLOR_1,
240
- ],
241
- 'condition' => [
242
- 'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
243
- ],
244
- 'selectors' => [
245
- '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border: solid {{VALUE}};',
246
- '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border: solid {{VALUE}};',
247
- ],
248
- ]
249
- );
250
-
251
- $this->add_control(
252
- 'premium_carousel_border_size',
253
- [
254
- 'label' => esc_html__( 'Border Size', 'premium-addons-for-elementor' ),
255
- 'type' => Controls_Manager::SLIDER,
256
- 'default' => [
257
- 'size' => 1,
258
- ],
259
- 'range' => [
260
- 'px' => [
261
- 'min' => 0,
262
- 'max' => 60
263
- ],
264
- ],
265
- 'condition' => [
266
- 'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
267
- ],
268
- 'selectors' => [
269
- '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border-width: {{SIZE}}{{UNIT}};',
270
- '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border-width: {{SIZE}}{{UNIT}};',
271
- ],
272
- ]
273
- );
274
-
275
- $this->add_control(
276
- 'premium_carousel_arrow_color',
277
- [
278
- 'label' => esc_html__( 'Arrow Color', 'premium-addons-for-elementor' ),
279
- 'type' => Controls_Manager::COLOR,
280
- 'scheme' => [
281
- 'type' => Scheme_Color::get_type(),
282
- 'value' => Scheme_Color::COLOR_2,
283
- ],
284
- 'condition' => [
285
- 'premium_carousel_navigation_show' => 'yes'
286
- ],
287
- 'selectors' => [
288
- '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'color: {{VALUE}};',
289
- ],
290
- ]
291
- );
292
-
293
- $this->add_control(
294
- 'premium_carousel_arrow_size',
295
- [
296
- 'label' => esc_html__( 'Arrow Size', 'premium-addons-for-elementor' ),
297
- 'type' => Controls_Manager::SLIDER,
298
- 'default' => [
299
- 'size' => 14,
300
- ],
301
- 'range' => [
302
- 'px' => [
303
- 'min' => 0,
304
- 'max' => 60
305
- ],
306
- ],
307
- 'condition' => [
308
- 'premium_carousel_navigation_show' => 'yes'
309
- ],
310
- 'selectors' => [
311
- '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};',
312
- ],
313
- ]
314
- );
315
316
- $this->add_control('premium_carousel_arrow_position',
317
- [
318
- 'label' => esc_html__('Arrows Position (PX)', 'premium-addons-for-elementor'),
319
- 'type' => Controls_Manager::SLIDER,
320
- 'range' => [
321
- 'px' => [
322
- 'min' => -50,
323
- 'max' => 1,
324
- ],
325
- ],
326
- 'condition' => [
327
- 'premium_carousel_navigation_show' => 'yes',
328
- 'premium_carousel_slider_type' => 'horizontal'
329
- ],
330
- ]
331
- );
332
-
333
- $this->add_control(
334
'premium_carousel_arrow_icon_next',
335
[
336
- 'label' => esc_html__( 'Select Icon for \'Next Arrow\'', 'premium-addons-for-elementor' ),
337
'type' => Controls_Manager::CHOOSE,
338
'options' => [
339
'right_arrow_bold' => [
@@ -364,7 +241,7 @@ class Premium_Carousel_Widget extends Widget_Base {
364
$this->add_control(
365
'premium_carousel_arrow_icon_next_ver',
366
[
367
- 'label' => esc_html__( 'Select Icon for \'Bottom Arrow\'', 'premium-addons-for-elementor' ),
368
'type' => Controls_Manager::CHOOSE,
369
'options' => [
370
'right_arrow_bold' => [
@@ -391,117 +268,226 @@ class Premium_Carousel_Widget extends Widget_Base {
391
]
392
);
393
394
$this->add_control(
395
- 'premium_carousel_arrow_icon_prev',
396
[
397
- 'label' => esc_html__( 'Select Icon for \'Prev Arrow\'', 'premium-addons-for-elementor' ),
398
'type' => Controls_Manager::CHOOSE,
399
'options' => [
400
'left_arrow_bold' => [
401
- 'icon' => 'fa fa-arrow-left',
402
],
403
'left_arrow_long' => [
404
- 'icon' => 'fa fa-long-arrow-left',
405
],
406
'left_arrow_long_circle' => [
407
- 'icon' => 'fa fa-arrow-circle-left',
408
],
409
'left_arrow_angle' => [
410
- 'icon' => 'fa fa-angle-left',
411
],
412
'left_arrow_chevron' => [
413
- 'icon' => 'fa fa-chevron-left',
414
]
415
],
416
'default' => 'left_arrow_angle',
417
'condition' => [
418
'premium_carousel_navigation_show' => 'yes',
419
- 'premium_carousel_slider_type!' => 'vertical',
420
]
421
]
422
);
423
-
424
- // If carousel slider is vertical type
425
$this->add_control(
426
- 'premium_carousel_arrow_icon_prev_ver',
427
[
428
- 'label' => esc_html__( 'Select Icon for \'Up Arrow\'', 'premium-addons-for-elementor' ),
429
'type' => Controls_Manager::CHOOSE,
430
'options' => [
431
'left_arrow_bold' => [
432
- 'icon' => 'fa fa-arrow-up',
433
],
434
'left_arrow_long' => [
435
- 'icon' => 'fa fa-long-arrow-up',
436
],
437
'left_arrow_long_circle' => [
438
- 'icon' => 'fa fa-arrow-circle-up',
439
],
440
'left_arrow_angle' => [
441
- 'icon' => 'fa fa-angle-up',
442
],
443
'left_arrow_chevron' => [
444
- 'icon' => 'fa fa-chevron-up',
445
]
446
],
447
'default' => 'left_arrow_angle',
448
'condition' => [
449
'premium_carousel_navigation_show' => 'yes',
450
- 'premium_carousel_slider_type' => 'vertical',
451
]
452
]
453
);
454
455
$this->add_control(
456
- 'premium_carousel_dot_navigation_show',
457
[
458
- 'label' => esc_html__( 'Navigation Dots', 'premium-addons-for-elementor' ),
459
- 'description' => esc_html__( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
460
- 'type' => Controls_Manager::SWITCHER,
461
- 'default' => 'yes'
462
]
463
);
464
465
$this->add_control(
466
- 'premium_carousel_dot_navigation_color',
467
[
468
- 'label' => esc_html__( 'Navigation Dots Color', 'premium-addons-for-elementor' ),
469
'type' => Controls_Manager::COLOR,
470
'scheme' => [
471
'type' => Scheme_Color::get_type(),
472
- 'value' => Scheme_Color::COLOR_2,
473
],
474
'condition' => [
475
- 'premium_carousel_dot_navigation_show' => 'yes'
476
],
477
- 'selectors' => [
478
- '{{WRAPPER}} ul.slick-dots li' => 'color: {{VALUE}}'
479
- ]
480
]
481
);
482
483
$this->add_control(
484
- 'premium_carousel_dot_navigation_active_color',
485
[
486
- 'label' => esc_html__( 'Dot Active Color', 'premium-addons-for-elementor' ),
487
'type' => Controls_Manager::COLOR,
488
'scheme' => [
489
'type' => Scheme_Color::get_type(),
490
'value' => Scheme_Color::COLOR_1,
491
],
492
'condition' => [
493
- 'premium_carousel_dot_navigation_show' => 'yes'
494
],
495
- 'selectors' => [
496
- '{{WRAPPER}} ul.slick-dots li.slick-active' => 'color: {{VALUE}}'
497
- ]
498
]
499
);
500
501
$this->add_control(
502
'premium_carousel_dot_icon',
503
[
504
- 'label' => esc_html__( 'Navigation Dots Icon', 'premium-addons-for-elementor' ),
505
'type' => Controls_Manager::CHOOSE,
506
'options' => [
507
'square_white' => [
@@ -527,12 +513,48 @@ class Premium_Carousel_Widget extends Widget_Base {
527
]
528
);
529
530
$this->end_controls_section();
531
532
$this->start_controls_section(
533
'premium-carousel-advance-settings',
534
[
535
- 'label' => esc_html__( 'Advanced Settings' , 'premium-addons-for-elementor' ),
536
'tab' => Controls_Manager::TAB_STYLE
537
]
538
);
@@ -603,7 +625,7 @@ class Premium_Carousel_Widget extends Widget_Base {
603
$this->add_control(
604
'premium_carousel_space_btw_items',
605
[
606
- 'label' => esc_html__( 'Space Between Two Items', 'premium-addons-for-elementor' ),
607
'description' => esc_html__('Set a spacing value in pixels (px)', 'premium-addons-for-elementor'),
608
'type' => Controls_Manager::NUMBER,
609
'default' => '15'
@@ -962,4 +984,4 @@ class Premium_Carousel_Widget extends Widget_Base {
962
963
}
964
}
965
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
40
// This will controls the animation, colors and background, dimensions etc
41
protected function _register_controls() {
42
$this->start_controls_section(
43
+ 'premium_carousel_global_settings',
44
[
45
+ 'label' => esc_html__( 'Carousel' , 'premium-addons-for-elementor' )
46
]
47
);
48
49
$this->add_control(
50
'premium_carousel_slider_content',
51
[
52
+ 'label' => esc_html__( 'Content', 'premium-addons-for-elementor' ),
53
'description' => esc_html__( 'Slider content is a template which you can choose from Elementor library. Each template will be a slider content', 'premium-addons-for-elementor' ),
54
'type' => Controls_Manager::SELECT2,
55
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
61
$this->add_control(
62
'premium_carousel_slider_type',
63
[
64
+ 'label' => esc_html__( 'Type', 'premium-addons-for-elementor' ),
65
'description' => esc_html__( 'Set a navigation type', 'premium-addons-for-elementor' ),
66
'type' => Controls_Manager::SELECT,
67
'default' => 'horizontal',
75
$this->add_control(
76
'premium_carousel_slides_to_show',
77
[
78
+ 'label' => esc_html__( 'Appearance', 'premium-addons-for-elementor' ),
79
'type' => Controls_Manager::SELECT,
80
'default' => 'all',
81
'options' => [
88
$this->add_control(
89
'premium_carousel_responsive_desktop',
90
[
91
+ 'label' => esc_html__( 'Desktop Slides', 'premium-addons-for-elementor' ),
92
'type' => Controls_Manager::NUMBER,
93
'default' => 5
94
]
97
$this->add_control(
98
'premium_carousel_responsive_tabs',
99
[
100
+ 'label' => esc_html__( 'Tabs Slides', 'premium-addons-for-elementor' ),
101
'type' => Controls_Manager::NUMBER,
102
'default' => 3
103
]
106
$this->add_control(
107
'premium_carousel_responsive_mobile',
108
[
109
+ 'label' => esc_html__( 'Mobile Slides', 'premium-addons-for-elementor' ),
110
'type' => Controls_Manager::NUMBER,
111
'default' => 2
112
]
113
);
114
115
+ $this->end_controls_section();
116
+
117
+ $this->start_controls_section(
118
+ 'premium_carousel_slides_settings',
119
+ [
120
+ 'label' => esc_html__( 'Slides\' Settings' , 'premium-addons-for-elementor' )
121
+ ]
122
+ );
123
+
124
$this->add_control(
125
'premium_carousel_loop',
126
[
144
$this->add_control(
145
'premium_carousel_autoplay',
146
[
147
+ 'label' => esc_html__( 'Autoplay Slides‏', 'premium-addons-for-elementor' ),
148
'description' => esc_html__( 'Slide will start automatically', 'premium-addons-for-elementor' ),
149
'type' => Controls_Manager::SWITCHER,
150
'default' => 'yes'
154
$this->add_control(
155
'premium_carousel_autoplay_speed',
156
[
157
+ 'label' => esc_html__( 'Autoplay Speed', 'premium-addons-for-elementor' ),
158
+ 'description' => esc_html__( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
159
'type' => Controls_Manager::NUMBER,
160
'default' => 5000,
161
'condition' => [
176
'premium_carousel_extra_class',
177
[
178
'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
179
+ 'type' => Controls_Manager::TEXT,
180
+ 'description' => esc_html__( 'Add extra class name that will be applied to the carousel, and you can use this class for your customizations.', 'premium-addons-for-elementor' ),
181
]
182
);
183
190
'tab' => Controls_Manager::TAB_STYLE
191
]
192
);
193
+
194
+ $this->add_control('premium_carousel_arrow_heading',
195
+ [
196
+ 'label' => esc_html__('Arrows','premium-addons-for-elementor'),
197
+ 'type' => Controls_manager::HEADING,
198
+ ]);
199
200
$this->add_control(
201
'premium_carousel_navigation_show',
202
[
203
+ 'label' => esc_html__( 'Arrows', 'premium-addons-for-elementor' ),
204
'description' => esc_html__( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
205
'type' => Controls_Manager::SWITCHER,
206
'default' => 'yes'
207
]
208
);
209
210
+ $this->add_control(
211
'premium_carousel_arrow_icon_next',
212
[
213
+ 'label' => esc_html__( 'Right Icon', 'premium-addons-for-elementor' ),
214
'type' => Controls_Manager::CHOOSE,
215
'options' => [
216
'right_arrow_bold' => [
241
$this->add_control(
242
'premium_carousel_arrow_icon_next_ver',
243
[
244
+ 'label' => esc_html__( 'Bottom Icon', 'premium-addons-for-elementor' ),
245
'type' => Controls_Manager::CHOOSE,
246
'options' => [
247
'right_arrow_bold' => [
268
]
269
);
270
271
+ // If carousel slider is vertical type
272
$this->add_control(
273
+ 'premium_carousel_arrow_icon_prev_ver',
274
[
275
+ 'label' => esc_html__( 'Top Icon', 'premium-addons-for-elementor' ),
276
'type' => Controls_Manager::CHOOSE,
277
'options' => [
278
'left_arrow_bold' => [
279
+ 'icon' => 'fa fa-arrow-up',
280
],
281
'left_arrow_long' => [
282
+ 'icon' => 'fa fa-long-arrow-up',
283
],
284
'left_arrow_long_circle' => [
285
+ 'icon' => 'fa fa-arrow-circle-up',
286
],
287
'left_arrow_angle' => [
288
+ 'icon' => 'fa fa-angle-up',
289
],
290
'left_arrow_chevron' => [
291
+ 'icon' => 'fa fa-chevron-up',
292
]
293
],
294
'default' => 'left_arrow_angle',
295
'condition' => [
296
'premium_carousel_navigation_show' => 'yes',
297
+ 'premium_carousel_slider_type' => 'vertical',
298
]
299
]
300
);
301
+
302
$this->add_control(
303
+ 'premium_carousel_arrow_icon_prev',
304
[
305
+ 'label' => esc_html__( 'Left Icon', 'premium-addons-for-elementor' ),
306
'type' => Controls_Manager::CHOOSE,
307
'options' => [
308
'left_arrow_bold' => [
309
+ 'icon' => 'fa fa-arrow-left',
310
],
311
'left_arrow_long' => [
312
+ 'icon' => 'fa fa-long-arrow-left',
313
],
314
'left_arrow_long_circle' => [
315
+ 'icon' => 'fa fa-arrow-circle-left',
316
],
317
'left_arrow_angle' => [
318
+ 'icon' => 'fa fa-angle-left',
319
],
320
'left_arrow_chevron' => [
321
+ 'icon' => 'fa fa-chevron-left',
322
]
323
],
324
'default' => 'left_arrow_angle',
325
'condition' => [
326
'premium_carousel_navigation_show' => 'yes',
327
+ 'premium_carousel_slider_type!' => 'vertical',
328
]
329
]
330
);
331
332
$this->add_control(
333
+ 'premium_carousel_arrow_style',
334
[
335
+ 'label' => esc_html__( 'Style', 'premium-addons-for-elementor' ),
336
+ 'type' => Controls_Manager::SELECT,
337
+ 'default' => 'default',
338
+ 'options' => [
339
+ 'default' => esc_html__( 'Default', 'premium-addons-for-elementor' ),
340
+ 'circle-bg' => esc_html__( 'Circle Background', 'premium-addons-for-elementor' ),
341
+ 'square-bg' => esc_html__( 'Square Background', 'premium-addons-for-elementor' ),
342
+ 'circle-border' => esc_html__( 'Circle border', 'premium-addons-for-elementor' ),
343
+ 'square-border' => esc_html__( 'Square border', 'premium-addons-for-elementor' ),
344
+ ],
345
+ 'condition' => [
346
+ 'premium_carousel_navigation_show' => 'yes'
347
+ ]
348
+ ]
349
+ );
350
+
351
+ $this->add_control(
352
+ 'premium_carousel_arrow_color',
353
+ [
354
+ 'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
355
+ 'type' => Controls_Manager::COLOR,
356
+ 'scheme' => [
357
+ 'type' => Scheme_Color::get_type(),
358
+ 'value' => Scheme_Color::COLOR_2,
359
+ ],
360
+ 'condition' => [
361
+ 'premium_carousel_navigation_show' => 'yes'
362
+ ],
363
+ 'selectors' => [
364
+ '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'color: {{VALUE}};',
365
+ ],
366
+ ]
367
+ );
368
+
369
+ $this->add_control(
370
+ 'premium_carousel_arrow_size',
371
+ [
372
+ 'label' => esc_html__( 'Size', 'premium-addons-for-elementor' ),
373
+ 'type' => Controls_Manager::SLIDER,
374
+ 'default' => [
375
+ 'size' => 14,
376
+ ],
377
+ 'range' => [
378
+ 'px' => [
379
+ 'min' => 0,
380
+ 'max' => 60
381
+ ],
382
+ ],
383
+ 'condition' => [
384
+ 'premium_carousel_navigation_show' => 'yes'
385
+ ],
386
+ 'selectors' => [
387
+ '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};',
388
+ ],
389
]
390
);
391
392
$this->add_control(
393
+ 'premium_carousel_arrow_bg_color',
394
[
395
+ 'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
396
'type' => Controls_Manager::COLOR,
397
'scheme' => [
398
'type' => Scheme_Color::get_type(),
399
+ 'value' => Scheme_Color::COLOR_1,
400
],
401
'condition' => [
402
+ 'premium_carousel_arrow_style' => [ 'circle-bg', 'square-bg' ]
403
+ ],
404
+ 'selectors' => [
405
+ '{{WRAPPER}} .premium-carousel-wrapper .circle-bg' => 'background: {{VALUE}};',
406
+ '{{WRAPPER}} .premium-carousel-wrapper .square-bg' => 'background: {{VALUE}};',
407
],
408
]
409
);
410
411
$this->add_control(
412
+ 'premium_carousel_arrow_border_color',
413
[
414
+ 'label' => esc_html__( 'Border Color', 'premium-addons-for-elementor' ),
415
'type' => Controls_Manager::COLOR,
416
'scheme' => [
417
'type' => Scheme_Color::get_type(),
418
'value' => Scheme_Color::COLOR_1,
419
],
420
'condition' => [
421
+ 'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
422
+ ],
423
+ 'selectors' => [
424
+ '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border: solid {{VALUE}};',
425
+ '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border: solid {{VALUE}};',
426
],
427
]
428
);
429
430
$this->add_control(
431
+ 'premium_carousel_border_size',
432
+ [
433
+ 'label' => esc_html__( 'Border Size', 'premium-addons-for-elementor' ),
434
+ 'type' => Controls_Manager::SLIDER,
435
+ 'default' => [
436
+ 'size' => 1,
437
+ ],
438
+ 'range' => [
439
+ 'px' => [
440
+ 'min' => 0,
441
+ 'max' => 60
442
+ ],
443
+ ],
444
+ 'condition' => [
445
+ 'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
446
+ ],
447
+ 'selectors' => [
448
+ '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border-width: {{SIZE}}{{UNIT}};',
449
+ '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border-width: {{SIZE}}{{UNIT}};',
450
+ ],
451
+ ]
452
+ );
453
+
454
+ $this->add_control('premium_carousel_arrow_position',
455
+ [
456
+ 'label' => esc_html__('Position (PX)', 'premium-addons-for-elementor'),
457
+ 'type' => Controls_Manager::SLIDER,
458
+ 'range' => [
459
+ 'px' => [
460
+ 'min' => -50,
461
+ 'max' => 1,
462
+ ],
463
+ ],
464
+ 'condition' => [
465
+ 'premium_carousel_navigation_show' => 'yes',
466
+ 'premium_carousel_slider_type' => 'horizontal'
467
+ ],
468
+ ]
469
+ );
470
+
471
+ $this->add_control('premium_carousel_dots_heading',
472
+ [
473
+ 'label' => esc_html__('Dots','premium-addons-for-elementor'),
474
+ 'type' => Controls_manager::HEADING,
475
+ ]);
476
+
477
+ $this->add_control(
478
+ 'premium_carousel_dot_navigation_show',
479
+ [
480
+ 'label' => esc_html__( 'Dots', 'premium-addons-for-elementor' ),
481
+ 'description' => esc_html__( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
482
+ 'type' => Controls_Manager::SWITCHER,
483
+ 'default' => 'yes'
484
+ ]
485
+ );
486
+
487
+ $this->add_control(
488
'premium_carousel_dot_icon',
489
[
490
+ 'label' => esc_html__( 'Icon', 'premium-addons-for-elementor' ),
491
'type' => Controls_Manager::CHOOSE,
492
'options' => [
493
'square_white' => [
513
]
514
);
515
516
+ $this->add_control(
517
+ 'premium_carousel_dot_navigation_color',
518
+ [
519
+ 'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
520
+ 'type' => Controls_Manager::COLOR,
521
+ 'scheme' => [
522
+ 'type' => Scheme_Color::get_type(),
523
+ 'value' => Scheme_Color::COLOR_2,
524
+ ],
525
+ 'condition' => [
526
+ 'premium_carousel_dot_navigation_show' => 'yes'
527
+ ],
528
+ 'selectors' => [
529
+ '{{WRAPPER}} ul.slick-dots li' => 'color: {{VALUE}}'
530
+ ]
531
+ ]
532
+ );
533
+
534
+ $this->add_control(
535
+ 'premium_carousel_dot_navigation_active_color',
536
+ [
537
+ 'label' => esc_html__( 'Active Color', 'premium-addons-for-elementor' ),
538
+ 'type' => Controls_Manager::COLOR,
539
+ 'scheme' => [
540
+ 'type' => Scheme_Color::get_type(),
541
+ 'value' => Scheme_Color::COLOR_1,
542
+ ],
543
+ 'condition' => [
544
+ 'premium_carousel_dot_navigation_show' => 'yes'
545
+ ],
546
+ 'selectors' => [
547
+ '{{WRAPPER}} ul.slick-dots li.slick-active' => 'color: {{VALUE}}'
548
+ ]
549
+ ]
550
+ );
551
+
552
$this->end_controls_section();
553
554
$this->start_controls_section(
555
'premium-carousel-advance-settings',
556
[
557
+ 'label' => esc_html__( 'Additional Settings' , 'premium-addons-for-elementor' ),
558
'tab' => Controls_Manager::TAB_STYLE
559
]
560
);
625
$this->add_control(
626
'premium_carousel_space_btw_items',
627
[
628
+ 'label' => esc_html__( 'Slides\' Spacing', 'premium-addons-for-elementor' ),
629
'description' => esc_html__('Set a spacing value in pixels (px)', 'premium-addons-for-elementor'),
630
'type' => Controls_Manager::NUMBER,
631
'default' => '15'
984
985
}
986
}
987
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
widgets/premium-countdown.php CHANGED
@@ -33,18 +33,18 @@ class Premium_Counter_Down_Widget extends Widget_Base {
33
$this->start_controls_section(
34
'premium_countdown_global_settings',
35
[
36
- 'label' => esc_html__( 'Countdown Settings', 'premium-addons-for-elementor' )
37
]
38
);
39
40
$this->add_control(
41
'premium_countdown_style',
42
[
43
- 'label' => esc_html__( 'Countdown Style', 'premium-addons-for-elementor' ),
44
'type' => Controls_Manager::SELECT,
45
'options' => [
46
- 'd-u-s' => esc_html__( 'Digit and Unit Side by Side', 'premium-addons-for-elementor' ),
47
- 'd-u-u' => esc_html__( 'Digit and Unit Up and Down', 'premium-addons-for-elementor' ),
48
],
49
'default' => 'd-u-u'
50
]
@@ -53,7 +53,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
53
$this->add_control(
54
'premium_countdown_date_time',
55
[
56
- 'label' => esc_html__( 'Target Date and Time', 'premium-addons-for-elementor' ),
57
'type' => Controls_Manager::DATE_TIME,
58
'picker_options' => [
59
'format' => 'Ym/d H:m:s'
@@ -66,7 +66,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
66
$this->add_control(
67
'premium_countdown_s_u_time',
68
[
69
- 'label' => esc_html__( 'Countdown Timer Depends On', 'premium-addons-for-elementor' ),
70
'type' => Controls_Manager::SELECT,
71
'options' => [
72
'wp-time' => esc_html__('WordPress Default', 'premium-addons-for-elementor' ),
@@ -80,7 +80,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
80
$this->add_control(
81
'premium_countdown_units',
82
[
83
- 'label' => esc_html__( 'Select Time Units', 'premium-addons-for-elementor' ),
84
'type' => Controls_Manager::SELECT2,
85
'description' => esc_html__('Select the time units that you want to display in countdown timer.', 'premium-addons-for-elementor' ),
86
'options' => [
@@ -109,20 +109,20 @@ class Premium_Counter_Down_Widget extends Widget_Base {
109
$this->start_controls_section(
110
'premium_countdown_on_expire_settings',
111
[
112
- 'label' => esc_html__( 'Expire Settings' , 'premium-addons-for-elementor' )
113
]
114
);
115
116
$this->add_control(
117
'premium_countdown_expire_text_url',
118
[
119
- 'label' => esc_html__('Expire Text or Redirection Link', 'premium-addons-for-elementor'),
120
'label_block' => false,
121
'type' => Controls_Manager::SELECT,
122
'description' => esc_html__('Choose whether if you want to set a message or a redirect link', 'premium-addons-for-elementor'),
123
'options' => [
124
- 'text' => esc_html__('Text', 'premium-addons-for-elementor'),
125
- 'url' => esc_html__('URL', 'premium-addons-for-elementor')
126
],
127
'default' => 'text'
128
]
@@ -307,7 +307,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
307
$this->add_control(
308
'premium_countdown_digit_color',
309
[
310
- 'label' => esc_html__( 'Digits Color', 'premium-addons-for-elementor' ),
311
'type' => Controls_Manager::COLOR,
312
'scheme' => [
313
'type' => Scheme_Color::get_type(),
@@ -387,7 +387,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
387
388
$this->start_controls_section('premium_countdown_unit_style',
389
[
390
- 'label' => esc_html__('Unit', 'premium-addons-for-elementor'),
391
'tab' => Controls_Manager::TAB_STYLE,
392
]
393
);
@@ -395,7 +395,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
395
$this->add_control(
396
'premium_countdown_unit_color',
397
[
398
- 'label' => esc_html__( 'Units Color', 'premium-addons-for-elementor' ),
399
'type' => Controls_Manager::COLOR,
400
'scheme' => [
401
'type' => Scheme_Color::get_type(),
@@ -420,7 +420,7 @@ class Premium_Counter_Down_Widget extends Widget_Base {
420
$this->add_responsive_control(
421
'premium_countdown_separator_width',
422
[
423
- 'label' => esc_html__( 'Separator Width', 'premium-addons-for-elementor' ),
424
'type' => Controls_Manager::SLIDER,
425
'default' => [
426
'size' => 40,
@@ -539,4 +539,4 @@ class Premium_Counter_Down_Widget extends Widget_Base {
539
540
}
541
542
- Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
33
$this->start_controls_section(
34
'premium_countdown_global_settings',
35
[
36
+ 'label' => esc_html__( 'Countdown', 'premium-addons-for-elementor' )
37
]
38
);
39
40
$this->add_control(
41
'premium_countdown_style',
42
[
43
+ 'label' => esc_html__( 'Style', 'premium-addons-for-elementor' ),
44
'type' => Controls_Manager::SELECT,
45
'options' => [
46
+ 'd-u-s' => esc_html__( 'Inline', 'premium-addons-for-elementor' ),
47
+ 'd-u-u' => esc_html__( 'Block', 'premium-addons-for-elementor' ),
48
],
49
'default' => 'd-u-u'
50
]
53
$this->add_control(
54
'premium_countdown_date_time',
55
[
56
+ 'label' => esc_html__( 'Due Date', 'premium-addons-for-elementor' ),
57
'type' => Controls_Manager::DATE_TIME,
58
'picker_options' => [
59
'format' => 'Ym/d H:m:s'
66
$this->add_control(
67
'premium_countdown_s_u_time',
68
[
69
+ 'label' => esc_html__( 'Time Zone', 'premium-addons-for-elementor' ),
70
'type' => Controls_Manager::SELECT,
71
'options' => [
72
'wp-time' => esc_html__('WordPress Default', 'premium-addons-for-elementor' ),
80
$this->add_control(
81
'premium_countdown_units',
82
[
83
+ 'label' => esc_html__( 'Time Units', 'premium-addons-for-elementor' ),
84
'type' => Controls_Manager::SELECT2,
85
'description' => esc_html__('Select the time units that you want to display in countdown timer.', 'premium-addons-for-elementor' ),
86
'options' => [
109
$this->start_controls_section(
110
'premium_countdown_on_expire_settings',
111
[
112
+ 'label' => esc_html__( 'Expire' , 'premium-addons-for-elementor' )
113
]
114
);
115
116
$this->add_control(
117
'premium_countdown_expire_text_url',
118
[
119
+ 'label' => esc_html__('Expire Type', 'premium-addons-for-elementor'),
120
'label_block' => false,
121
'type' => Controls_Manager::SELECT,
122
'description' => esc_html__('Choose whether if you want to set a message or a redirect link', 'premium-addons-for-elementor'),
123
'options' => [
124
+ 'text' => esc_html__('Message', 'premium-addons-for-elementor'),
125
+ 'url' => esc_html__('Redirection Link', 'premium-addons-for-elementor')
126
],
127
'default' => 'text'
128
]
307
$this->add_control(
308
'premium_countdown_digit_color',
309
[
310
+ 'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
311
'type' => Controls_Manager::COLOR,
312
'scheme' => [
313
'type' => Scheme_Color::get_type(),
387
388
$this->start_controls_section('premium_countdown_unit_style',
389
[
390
+ 'label' => esc_html__('Units', 'premium-addons-for-elementor'),
391
'tab' => Controls_Manager::TAB_STYLE,
392
]
393
);
395
$this->add_control(
396
'premium_countdown_unit_color',
397
[
398
+ 'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
399
'type' => Controls_Manager::COLOR,
400
'scheme' => [
401
'type' => Scheme_Color::get_type(),
420
$this->add_responsive_control(
421
'premium_countdown_separator_width',
422
[
423
+ 'label' => esc_html__( 'Spacing in Between', 'premium-addons-for-elementor' ),
424
'type' => Controls_Manager::SLIDER,
425
'default' => [
426
'size' => 40,
539
540
}
541
542
+ Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
widgets/premium-counter.php CHANGED
@@ -29,6 +29,82 @@ class Premium_Counter_Widget extends Widget_Base {
29
// This will controls the animation, colors and background, dimensions etc
30
protected function _register_controls() {
31
$this->start_controls_section('premium_counter_global_settings',
32
[
33
'label' => esc_html__( 'Display Options', 'premium-addons-for-elementor' )
34
]
@@ -40,8 +116,8 @@ class Premium_Counter_Widget extends Widget_Base {
40
'type' => Controls_Manager::SELECT,
41
'description' => esc_html__('Use a font awesome icon or upload a custom image', 'premium-addons-for-elementor'),
42
'options' => [
43
- 'icon' => esc_html__('Font Awesome Icon', 'premium-addons-for-elementor'),
44
- 'custom'=> esc_html__( 'Custom Image Icon', 'premium-addons-for-elementor')
45
],
46
'default' => 'icon'
47
]
@@ -70,10 +146,61 @@ class Premium_Counter_Widget extends Widget_Base {
70
]
71
]
72
);
73
-
74
- $this->add_responsive_control('premium_counter_icon_size',
75
[
76
- 'label' => esc_html__( 'Icon Size', 'premium-addons-for-elementor' ),
77
'type' => Controls_Manager::SLIDER,
78
'default' => [
79
'size' => 70,
@@ -95,7 +222,7 @@ class Premium_Counter_Widget extends Widget_Base {
95
96
$this->add_responsive_control('premium_counter_image_size',
97
[
98
- 'label' => esc_html__( 'Image Size', 'premium-addons-for-elementor' ),
99
'type' => Controls_Manager::SLIDER,
100
'default' => [
101
'size' => 60,
@@ -115,26 +242,9 @@ class Premium_Counter_Widget extends Widget_Base {
115
]
116
);
117
118
- $this->add_control('premium_counter_icon_color',
119
- [
120
- 'label' => esc_html__( 'Icon Color', 'premium-addons-for-elementor' ),
121
- 'type' => Controls_Manager::COLOR,
122
- 'scheme' => [
123
- 'type' => Scheme_Color::get_type(),
124
- 'value' => Scheme_Color::COLOR_1,
125