Premium Addons for Elementor - Version 2.9.1

Version Description

  • Tweak: Ability to change default active category with First Category option enabled in Premium Grid widget.
  • Tweak: Unnecessary functions removed from Carousel, Grid widgets to enhance performance.
  • Fixed: Prevent page scroll to top when modal box trigger is clicked.
Download this release

Release Info

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

Code changes from version 2.9.0 to 2.9.1

admin/settings/version-control.php CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
- <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.8.9</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
+ <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.9.0</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
assets/css/premium-addons.css CHANGED
@@ -1238,7 +1238,7 @@ button.premium-modal-box-modal-close {
1238
  /* prevent Scroll on body */
1239
  .premium-modal-open {
1240
  overflow: hidden;
1241
- height: 100vh;
1242
  }
1243
  @media (min-width:768px) {
1244
  .premium-modal-box-modal-dialog {
1238
  /* prevent Scroll on body */
1239
  .premium-modal-open {
1240
  overflow: hidden;
1241
+ /* height: 100vh;*/
1242
  }
1243
  @media (min-width:768px) {
1244
  .premium-modal-box-modal-dialog {
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 2.9.0
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -22,12 +22,12 @@ if (! function_exists('add_action')) {
22
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
23
 
24
 
25
- define('PREMIUM_ADDONS_VERSION', '2.9.0');
26
  define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
27
  define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
28
  define('PREMIUM_ADDONS_FILE', __FILE__);
29
  define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
- define('PREMIUM_ADDONS_STABLE_VERSION', '2.8.9');
31
 
32
  if( ! class_exists('Premium_Addons_Elementor') ) {
33
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 2.9.1
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
22
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
23
 
24
 
25
+ define('PREMIUM_ADDONS_VERSION', '2.9.1');
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.9.0');
31
 
32
  if( ! class_exists('Premium_Addons_Elementor') ) {
33
  /*
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 5.0.1
7
  Requires PHP: 5.4
8
- Stable tag: 2.9.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -137,6 +137,13 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
140
  = 2.9.0 =
141
 
142
  - Tweak: CSS files loaded only when required to enhance plugin performance.
5
  Requires at least: 4.5
6
  Tested up to: 5.0.1
7
  Requires PHP: 5.4
8
+ Stable tag: 2.9.1
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
137
 
138
  == Changelog ==
139
 
140
+ = 2.9.1 =
141
+
142
+ - Tweak: Ability to change default active category with `First Category` option enabled in Premium Grid widget.
143
+ - Tweak: Unnecessary functions removed from Carousel, Grid widgets to enhance performance.
144
+ - Fixed: Prevent page scroll to top when modal box trigger is clicked.
145
+
146
+
147
  = 2.9.0 =
148
 
149
  - Tweak: CSS files loaded only when required to enhance plugin performance.
widgets/premium-carousel.php CHANGED
@@ -28,7 +28,10 @@ class Premium_Carousel extends Widget_Base {
28
  }
29
 
30
  public function get_script_depends() {
31
- return ['premium-addons-js','slick-carousel-js'];
 
 
 
32
  }
33
 
34
  public function get_categories() {
@@ -39,15 +42,13 @@ class Premium_Carousel extends Widget_Base {
39
  // Adding the controls fields for the premium carousel
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_content_type',
51
  [
52
  'label' => esc_html__( 'Content Type', 'premium-addons-for-elementor' ),
53
  'description' => esc_html__( 'How templates are selected', 'premium-addons-for-elementor' ),
@@ -56,18 +57,17 @@ class Premium_Carousel extends Widget_Base {
56
  'select' => esc_html__( 'Select Field', 'premium-addons-for-elementor' ),
57
  'repeater' => esc_html__( 'Repeater', 'premium-addons-for-elementor' )
58
  ],
59
- 'default' => 'select',
60
  ]
61
  );
62
 
63
- $this->add_control(
64
- 'premium_carousel_slider_content',
65
  [
66
- 'label' => esc_html__( 'Templates', 'premium-addons-for-elementor' ),
67
  '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' ),
68
- 'type' => Controls_Manager::SELECT2,
69
- 'options' => $this->getTemplateInstance()->get_elementor_page_list(),
70
- 'multiple' => true,
71
  'condition' => [
72
  'premium_carousel_content_type' => 'select'
73
  ]
@@ -76,17 +76,15 @@ class Premium_Carousel extends Widget_Base {
76
 
77
  $repeater = new REPEATER();
78
 
79
- $repeater->add_control(
80
- 'premium_carousel_repeater_item',
81
- [
82
- 'label' => esc_html__( 'Content', 'premium-addons-for-elementor' ),
83
- 'type' => Controls_Manager::SELECT2,
84
- 'options' => $this->getTemplateInstance()->get_elementor_page_list(),
85
- ]
86
- );
87
 
88
- $this->add_control(
89
- 'premium_carousel_templates_repeater',
90
  [
91
  'label' => esc_html__('Templates', 'premium-addons-for-elementor'),
92
  'type' => Controls_Manager::REPEATER,
@@ -99,8 +97,7 @@ class Premium_Carousel extends Widget_Base {
99
  );
100
 
101
 
102
- $this->add_control(
103
- 'premium_carousel_slider_type',
104
  [
105
  'label' => esc_html__( 'Type', 'premium-addons-for-elementor' ),
106
  'description' => esc_html__( 'Set a navigation type', 'premium-addons-for-elementor' ),
@@ -109,12 +106,11 @@ class Premium_Carousel extends Widget_Base {
109
  'horizontal' => esc_html__( 'Horizontal', 'premium-addons-for-elementor' ),
110
  'vertical' => esc_html__( 'Vertical', 'premium-addons-for-elementor' )
111
  ],
112
- 'default' => 'horizontal',
113
  ]
114
  );
115
 
116
- $this->add_control(
117
- 'premium_carousel_slides_to_show',
118
  [
119
  'label' => esc_html__( 'Appearance', 'premium-addons-for-elementor' ),
120
  'type' => Controls_Manager::SELECT,
@@ -126,8 +122,7 @@ class Premium_Carousel extends Widget_Base {
126
  ]
127
  );
128
 
129
- $this->add_control(
130
- 'premium_carousel_responsive_desktop',
131
  [
132
  'label' => esc_html__( 'Desktop Slides', 'premium-addons-for-elementor' ),
133
  'type' => Controls_Manager::NUMBER,
@@ -135,8 +130,7 @@ class Premium_Carousel extends Widget_Base {
135
  ]
136
  );
137
 
138
- $this->add_control(
139
- 'premium_carousel_responsive_tabs',
140
  [
141
  'label' => esc_html__( 'Tabs Slides', 'premium-addons-for-elementor' ),
142
  'type' => Controls_Manager::NUMBER,
@@ -144,8 +138,7 @@ class Premium_Carousel extends Widget_Base {
144
  ]
145
  );
146
 
147
- $this->add_control(
148
- 'premium_carousel_responsive_mobile',
149
  [
150
  'label' => esc_html__( 'Mobile Slides', 'premium-addons-for-elementor' ),
151
  'type' => Controls_Manager::NUMBER,
@@ -155,15 +148,13 @@ class Premium_Carousel extends Widget_Base {
155
 
156
  $this->end_controls_section();
157
 
158
- $this->start_controls_section(
159
- 'premium_carousel_slides_settings',
160
  [
161
  'label' => esc_html__( 'Slides\' Settings' , 'premium-addons-for-elementor' )
162
  ]
163
  );
164
 
165
- $this->add_control(
166
- 'premium_carousel_loop',
167
  [
168
  'label' => esc_html__( 'Infinite Loop', 'premium-addons-for-elementor' ),
169
  'type' => Controls_Manager::SWITCHER,
@@ -172,8 +163,7 @@ class Premium_Carousel extends Widget_Base {
172
  ]
173
  );
174
 
175
- $this->add_control(
176
- 'premium_carousel_speed',
177
  [
178
  'label' => esc_html__( 'Transition Speed', 'premium-addons-for-elementor' ),
179
  'description' => esc_html__( 'Set a navigation speed value. The value will be counted in milliseconds (ms)', 'premium-addons-for-elementor' ),
@@ -182,8 +172,7 @@ class Premium_Carousel extends Widget_Base {
182
  ]
183
  );
184
 
185
- $this->add_control(
186
- 'premium_carousel_autoplay',
187
  [
188
  'label' => esc_html__( 'Autoplay Slides‏', 'premium-addons-for-elementor' ),
189
  'description' => esc_html__( 'Slide will start automatically', 'premium-addons-for-elementor' ),
@@ -192,8 +181,7 @@ class Premium_Carousel extends Widget_Base {
192
  ]
193
  );
194
 
195
- $this->add_control(
196
- 'premium_carousel_autoplay_speed',
197
  [
198
  'label' => esc_html__( 'Autoplay Speed', 'premium-addons-for-elementor' ),
199
  'description' => esc_html__( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
@@ -213,8 +201,7 @@ class Premium_Carousel extends Widget_Base {
213
  ]
214
  );
215
 
216
- $this->add_control(
217
- 'premium_carousel_extra_class',
218
  [
219
  'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
220
  'type' => Controls_Manager::TEXT,
@@ -224,10 +211,9 @@ class Premium_Carousel extends Widget_Base {
224
 
225
  $this->end_controls_section();
226
 
227
- $this->start_controls_section(
228
- 'premium_carousel_navigation',
229
  [
230
- 'label' => esc_html__( 'Navigation', 'premium-addons-for-elementor' ),
231
  'tab' => Controls_Manager::TAB_STYLE
232
  ]
233
  );
@@ -235,11 +221,11 @@ class Premium_Carousel extends Widget_Base {
235
  $this->add_control('premium_carousel_arrow_heading',
236
  [
237
  'label' => esc_html__('Arrows','premium-addons-for-elementor'),
238
- 'type' => Controls_manager::HEADING,
239
- ]);
 
240
 
241
- $this->add_control(
242
- 'premium_carousel_navigation_show',
243
  [
244
  'label' => esc_html__( 'Arrows', 'premium-addons-for-elementor' ),
245
  'description' => esc_html__( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
@@ -248,16 +234,15 @@ class Premium_Carousel extends Widget_Base {
248
  ]
249
  );
250
 
251
- $this->add_control(
252
- 'premium_carousel_arrow_icon_next',
253
  [
254
- 'label' => esc_html__( 'Right Icon', 'premium-addons-for-elementor' ),
255
- 'type' => Controls_Manager::CHOOSE,
256
- 'options' => [
257
- 'right_arrow_bold' => [
258
  'icon' => 'fa fa-arrow-right',
259
  ],
260
- 'right_arrow_long' => [
261
  'icon' => 'fa fa-long-arrow-right',
262
  ],
263
  'right_arrow_long_circle' => [
@@ -270,17 +255,16 @@ class Premium_Carousel extends Widget_Base {
270
  'icon' => 'fa fa-chevron-right',
271
  ]
272
  ],
273
- 'default' => 'right_arrow_angle',
274
  'condition' => [
275
- 'premium_carousel_navigation_show' => 'yes',
276
- 'premium_carousel_slider_type!' => 'vertical'
277
  ]
278
  ]
279
  );
280
 
281
  // If the carousel type vertical
282
- $this->add_control(
283
- 'premium_carousel_arrow_icon_next_ver',
284
  [
285
  'label' => esc_html__( 'Bottom Icon', 'premium-addons-for-elementor' ),
286
  'type' => Controls_Manager::CHOOSE,
@@ -303,19 +287,18 @@ class Premium_Carousel extends Widget_Base {
303
  ],
304
  'default' => 'right_arrow_angle',
305
  'condition' => [
306
- 'premium_carousel_navigation_show' => 'yes',
307
- 'premium_carousel_slider_type' => 'vertical',
308
  ]
309
  ]
310
  );
311
 
312
  // If carousel slider is vertical type
313
- $this->add_control(
314
- 'premium_carousel_arrow_icon_prev_ver',
315
  [
316
- 'label' => esc_html__( 'Top Icon', 'premium-addons-for-elementor' ),
317
- 'type' => Controls_Manager::CHOOSE,
318
- 'options' => [
319
  'left_arrow_bold' => [
320
  'icon' => 'fa fa-arrow-up',
321
  ],
@@ -334,18 +317,17 @@ class Premium_Carousel extends Widget_Base {
334
  ],
335
  'default' => 'left_arrow_angle',
336
  'condition' => [
337
- 'premium_carousel_navigation_show' => 'yes',
338
- 'premium_carousel_slider_type' => 'vertical',
339
  ]
340
  ]
341
  );
342
 
343
- $this->add_control(
344
- 'premium_carousel_arrow_icon_prev',
345
  [
346
- 'label' => esc_html__( 'Left Icon', 'premium-addons-for-elementor' ),
347
- 'type' => Controls_Manager::CHOOSE,
348
- 'options' => [
349
  'left_arrow_bold' => [
350
  'icon' => 'fa fa-arrow-left',
351
  ],
@@ -370,8 +352,7 @@ class Premium_Carousel extends Widget_Base {
370
  ]
371
  );
372
 
373
- $this->add_control(
374
- 'premium_carousel_arrow_style',
375
  [
376
  'label' => esc_html__( 'Style', 'premium-addons-for-elementor' ),
377
  'type' => Controls_Manager::SELECT,
@@ -389,8 +370,7 @@ class Premium_Carousel extends Widget_Base {
389
  ]
390
  );
391
 
392
- $this->add_control(
393
- 'premium_carousel_arrow_color',
394
  [
395
  'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
396
  'type' => Controls_Manager::COLOR,
@@ -407,15 +387,14 @@ class Premium_Carousel extends Widget_Base {
407
  ]
408
  );
409
 
410
- $this->add_control(
411
- 'premium_carousel_arrow_size',
412
  [
413
- 'label' => esc_html__( 'Size', 'premium-addons-for-elementor' ),
414
- 'type' => Controls_Manager::SLIDER,
415
- 'default' => [
416
  'size' => 14,
417
  ],
418
- 'range' => [
419
  'px' => [
420
  'min' => 0,
421
  'max' => 60
@@ -424,14 +403,13 @@ class Premium_Carousel extends Widget_Base {
424
  'condition' => [
425
  'premium_carousel_navigation_show' => 'yes'
426
  ],
427
- 'selectors' => [
428
  '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};',
429
  ],
430
  ]
431
  );
432
 
433
- $this->add_control(
434
- 'premium_carousel_arrow_bg_color',
435
  [
436
  'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
437
  'type' => Controls_Manager::COLOR,
@@ -442,15 +420,14 @@ class Premium_Carousel extends Widget_Base {
442
  'condition' => [
443
  'premium_carousel_arrow_style' => [ 'circle-bg', 'square-bg' ]
444
  ],
445
- 'selectors' => [
446
  '{{WRAPPER}} .premium-carousel-wrapper .circle-bg' => 'background: {{VALUE}};',
447
  '{{WRAPPER}} .premium-carousel-wrapper .square-bg' => 'background: {{VALUE}};',
448
  ],
449
  ]
450
  );
451
 
452
- $this->add_control(
453
- 'premium_carousel_arrow_border_color',
454
  [
455
  'label' => esc_html__( 'Border Color', 'premium-addons-for-elementor' ),
456
  'type' => Controls_Manager::COLOR,
@@ -461,22 +438,21 @@ class Premium_Carousel extends Widget_Base {
461
  'condition' => [
462
  'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
463
  ],
464
- 'selectors' => [
465
  '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border: solid {{VALUE}};',
466
  '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border: solid {{VALUE}};',
467
  ],
468
  ]
469
  );
470
 
471
- $this->add_control(
472
- 'premium_carousel_border_size',
473
  [
474
- 'label' => esc_html__( 'Border Size', 'premium-addons-for-elementor' ),
475
- 'type' => Controls_Manager::SLIDER,
476
- 'default' => [
477
  'size' => 1,
478
  ],
479
- 'range' => [
480
  'px' => [
481
  'min' => 0,
482
  'max' => 60
@@ -485,7 +461,7 @@ class Premium_Carousel extends Widget_Base {
485
  'condition' => [
486
  'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
487
  ],
488
- 'selectors' => [
489
  '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border-width: {{SIZE}}{{UNIT}};',
490
  '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border-width: {{SIZE}}{{UNIT}};',
491
  ],
@@ -494,9 +470,9 @@ class Premium_Carousel extends Widget_Base {
494
 
495
  $this->add_control('premium_carousel_arrow_position',
496
  [
497
- 'label' => esc_html__('Position (PX)', 'premium-addons-for-elementor'),
498
- 'type' => Controls_Manager::SLIDER,
499
- 'range' => [
500
  'px' => [
501
  'min' => -50,
502
  'max' => 1,
@@ -515,8 +491,7 @@ class Premium_Carousel extends Widget_Base {
515
  'type' => Controls_manager::HEADING,
516
  ]);
517
 
518
- $this->add_control(
519
- 'premium_carousel_dot_navigation_show',
520
  [
521
  'label' => esc_html__( 'Dots', 'premium-addons-for-elementor' ),
522
  'description' => esc_html__( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
@@ -525,12 +500,11 @@ class Premium_Carousel extends Widget_Base {
525
  ]
526
  );
527
 
528
- $this->add_control(
529
- 'premium_carousel_dot_icon',
530
  [
531
- 'label' => esc_html__( 'Icon', 'premium-addons-for-elementor' ),
532
- 'type' => Controls_Manager::CHOOSE,
533
- 'options' => [
534
  'square_white' => [
535
  'icon' => 'fa fa-square-o',
536
  ],
@@ -554,8 +528,7 @@ class Premium_Carousel extends Widget_Base {
554
  ]
555
  );
556
 
557
- $this->add_control(
558
- 'premium_carousel_dot_navigation_color',
559
  [
560
  'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
561
  'type' => Controls_Manager::COLOR,
@@ -572,8 +545,7 @@ class Premium_Carousel extends Widget_Base {
572
  ]
573
  );
574
 
575
- $this->add_control(
576
- 'premium_carousel_dot_navigation_active_color',
577
  [
578
  'label' => esc_html__( 'Active Color', 'premium-addons-for-elementor' ),
579
  'type' => Controls_Manager::COLOR,
@@ -590,8 +562,7 @@ class Premium_Carousel extends Widget_Base {
590
  ]
591
  );
592
 
593
- $this->add_control(
594
- 'premium_carousel_navigation_effect',
595
  [
596
  'label' => esc_html__( 'Ripple Effect', 'premium-addons-for-elementor' ),
597
  'description' => esc_html__( 'Enable a ripple effect when the active dot is hovered/clicked', 'premium-addons-for-elementor' ),
@@ -602,8 +573,7 @@ class Premium_Carousel extends Widget_Base {
602
  ]
603
  );
604
 
605
- $this->add_control(
606
- 'premium_carousel_navigation_effect_border_color',
607
  [
608
  'label' => esc_html__( 'Ripple Color', 'premium-addons-for-elementor' ),
609
  'type' => Controls_Manager::COLOR,
@@ -623,32 +593,30 @@ class Premium_Carousel extends Widget_Base {
623
 
624
  /*First Border Radius*/
625
  $this->add_control('premium_carousel_navigation_effect_border_radius',
626
- [
627
- 'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
628
- 'type' => Controls_Manager::SLIDER,
629
- 'size_units' => ['px', '%', 'em'],
630
- 'condition' => [
631
- 'premium_carousel_dot_navigation_show' => 'yes',
632
- 'premium_carousel_navigation_effect' => 'yes'
633
- ],
634
- 'selectors' => [
635
- '{{WRAPPER}} .premium-carousel-wrapper.hvr-ripple-out ul.slick-dots li.slick-active:before' => 'border-radius: {{SIZE}}{{UNIT}};'
636
- ]
637
  ]
638
- );
 
639
 
640
  $this->end_controls_section();
641
 
642
- $this->start_controls_section(
643
- 'premium-carousel-advance-settings',
644
  [
645
- 'label' => esc_html__( 'Additional Settings' , 'premium-addons-for-elementor' ),
646
  'tab' => Controls_Manager::TAB_STYLE
647
  ]
648
  );
649
 
650
- $this->add_control(
651
- 'premium_carousel_draggable_effect',
652
  [
653
  'label' => esc_html__( 'Draggable Effect', 'premium-addons-for-elementor' ),
654
  'description' => esc_html__( 'Allow the slides to be dragged by mouse click', 'premium-addons-for-elementor' ),
@@ -657,8 +625,7 @@ class Premium_Carousel extends Widget_Base {
657
  ]
658
  );
659
 
660
- $this->add_control(
661
- 'premium_carousel_touch_move',
662
  [
663
  'label' => esc_html__( 'Touch Move', 'premium-addons-for-elementor' ),
664
  'description' => esc_html__( 'Enable slide moving with touch', 'premium-addons-for-elementor' ),
@@ -667,8 +634,7 @@ class Premium_Carousel extends Widget_Base {
667
  ]
668
  );
669
 
670
- $this->add_control(
671
- 'premium_carousel_RTL_Mode',
672
  [
673
  'label' => esc_html__( 'RTL Mode', 'premium-addons-for-elementor' ),
674
  'description' => esc_html__( 'Turn on RTL mode if your language starts from right to left', 'premium-addons-for-elementor' ),
@@ -679,8 +645,7 @@ class Premium_Carousel extends Widget_Base {
679
  ]
680
  );
681
 
682
- $this->add_control(
683
- 'premium_carousel_adaptive_height',
684
  [
685
  'label' => esc_html__( 'Adaptive Height', 'premium-addons-for-elementor' ),
686
  'description' => esc_html__( 'Adaptive height setting gives each slide a fixed height to avoid huge white space gaps', 'premium-addons-for-elementor' ),
@@ -688,8 +653,7 @@ class Premium_Carousel extends Widget_Base {
688
  ]
689
  );
690
 
691
- $this->add_control(
692
- 'premium_carousel_pausehover',
693
  [
694
  'label' => esc_html__( 'Pause on Hover', 'premium-addons-for-elementor' ),
695
  'description' => esc_html__( 'Pause the slider when mouse hover', 'premium-addons-for-elementor' ),
@@ -697,8 +661,7 @@ class Premium_Carousel extends Widget_Base {
697
  ]
698
  );
699
 
700
- $this->add_control(
701
- 'premium_carousel_center_mode',
702
  [
703
  'label' => esc_html__( 'Center Mode', 'premium-addons-for-elementor' ),
704
  'description' => esc_html__( 'Center mode enables a centered view with partial next/previous slides. Animations and all visible scroll type doesn\'t work with this mode', 'premium-addons-for-elementor' ),
@@ -706,8 +669,7 @@ class Premium_Carousel extends Widget_Base {
706
  ]
707
  );
708
 
709
- $this->add_control(
710
- 'premium_carousel_space_btw_items',
711
  [
712
  'label' => esc_html__( 'Slides\' Spacing', 'premium-addons-for-elementor' ),
713
  'description' => esc_html__('Set a spacing value in pixels (px)', 'premium-addons-for-elementor'),
@@ -718,15 +680,12 @@ class Premium_Carousel extends Widget_Base {
718
  }
719
 
720
  protected function render() {
 
721
  $settings = $this->get_settings();
 
722
  $arrows_position = $settings['premium_carousel_arrow_position']['size'] . 'px';
723
- // Carousel sliding type
724
- if( $settings['premium_carousel_slider_type'] == 'horizontal' ){
725
- $vertical = false;
726
- } else if( $settings['premium_carousel_slider_type'] == 'vertical' ) {
727
- $vertical = true;
728
- }
729
-
730
  // responsive carousel set up
731
 
732
  $slides_on_desk = $settings['premium_carousel_responsive_desktop'];
@@ -741,76 +700,44 @@ class Premium_Carousel extends Widget_Base {
741
  $slides_on_tabs = $settings['premium_carousel_responsive_tabs'];
742
  $slides_on_mob = $settings['premium_carousel_responsive_mobile'];
743
 
744
- if( $settings['premium_carousel_responsive_tabs'] == '' ) {
745
  $slides_on_tabs = $slides_on_desk;
746
  }
747
 
748
- if( $settings['premium_carousel_responsive_mobile'] == '' ) {
749
  $slides_on_mob = $slides_on_desk;
750
  }
751
 
752
  $responsive = '[{breakpoint: 1025,settings: {slidesToShow: ' . $slides_on_desk . ',slidesToScroll: ' . $slidesToScroll . '}},{breakpoint: 769,settings: {slidesToShow: ' . $slides_on_tabs . ',slidesToScroll: ' . $slides_on_tabs . '}},{breakpoint: 481,settings: {slidesToShow: ' . $slides_on_mob . ',slidesToScroll: ' . $slides_on_mob . '}}]';
753
 
754
- if( $settings['premium_carousel_loop'] == 'yes' ) {
755
- $infinite = true;
756
- } else {
757
- $infinite = false;
758
- }
759
-
760
- if( $settings['premium_carousel_speed'] != '' ) {
761
- $speed = $settings['premium_carousel_speed'];
762
- } else {
763
- $speed = '';
764
- }
765
 
766
- if( $settings['premium_carousel_autoplay'] == 'yes' ) {
767
- $autoplay = true;
768
-
769
- if( $settings['premium_carousel_autoplay_speed'] !== '' ) {
770
- $autoplaySpeed = $settings['premium_carousel_autoplay_speed'];
771
- }
772
- } else {
773
- $autoplay = false;
774
- $autoplaySpeed = '';
775
- }
776
-
777
- if( $settings['premium_carousel_draggable_effect'] == 'yes' ) {
778
- $draggable = true;
779
- } else {
780
- $draggable = false;
781
- }
782
- if( $settings['premium_carousel_touch_move'] == 'yes' ) {
783
- $touchMove = true;
784
- } else {
785
- $touchMove = false;
786
- }
787
  $dir = '';
 
 
788
  if( $settings['premium_carousel_RTL_Mode'] == 'yes' ) {
789
  $rtl = true;
790
  $dir = 'dir="rtl"';
791
- } else {
792
- $rtl = false;
793
- }
794
- if( $settings['premium_carousel_adaptive_height'] == 'yes' ) {
795
- $adaptiveHeight = true;
796
- } else {
797
- $adaptiveHeight = false;
798
- }
799
- if( $settings['premium_carousel_pausehover'] == 'yes' ) {
800
- $pauseOnHover = true;
801
- } else {
802
- $pauseOnHover = false;
803
- }
804
- if( $settings['premium_carousel_center_mode'] == 'yes' ) {
805
- $centerMode = true;
806
- } else {
807
- $centerMode = false;
808
- }
809
- if( $settings['premium_carousel_space_btw_items'] !== '' ) {
810
- $centerPadding = $settings['premium_carousel_space_btw_items']."px";
811
- } else {
812
- $centerPadding = '';
813
  }
 
 
 
 
 
 
 
 
 
814
  // Navigation arrow setting setup
815
  if( $settings['premium_carousel_navigation_show'] == 'yes') {
816
  $arrows = true;
@@ -944,11 +871,7 @@ class Premium_Carousel extends Widget_Base {
944
  $animation_class = $settings['premium_carousel_animation_list'];
945
  $animation = 'class="item-wrapper" data-animation="animated ' . $animation_class .'"';
946
 
947
- if($settings['premium_carousel_navigation_effect'] == 'yes') {
948
- $dot_anim = 'hvr-ripple-out';
949
- } else {
950
- $dot_anim = '';
951
- }
952
 
953
  $carousel_settings = [
954
  'vertical' => $vertical,
@@ -986,32 +909,42 @@ class Premium_Carousel extends Widget_Base {
986
  }
987
 
988
  $premium_elements_frontend = new Frontend;
989
-
 
 
 
 
 
 
 
 
 
 
 
990
 
991
  ?>
992
 
993
- <div id="premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-wrapper <?php echo esc_attr($dot_anim); ?> carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?><?php echo $extra_class;?>" <?php echo $dir; ?> data-settings='<?php echo wp_json_encode($carousel_settings); ?>'>
994
- <div id="premium-carousel-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-inner">
995
- <?php
996
-
997
- foreach( $premium_elements_page_id as $elementor_post_id ) :
998
- ?>
999
- <div <?php echo $animation; ?>>
1000
- <?php echo $premium_elements_frontend->get_builder_content($elementor_post_id, true); ?>
1001
- </div>
1002
- <?php endforeach; ?>
1003
- </div>
1004
- </div>
1005
- <style>
1006
- <?php if(!empty($settings['premium_carousel_arrow_position']['size'])) : ?>
1007
- #premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?> a.carousel-arrow.carousel-next {
1008
- right: <?php echo $arrows_position; ?>
1009
- }
1010
- #premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?> a.carousel-arrow.carousel-prev {
1011
- left: <?php echo $arrows_position; ?>
1012
- }
1013
- <?php endif; ?>
1014
- </style>
1015
  <?php
1016
  }
1017
  }
28
  }
29
 
30
  public function get_script_depends() {
31
+ return [
32
+ 'premium-addons-js',
33
+ 'slick-carousel-js'
34
+ ];
35
  }
36
 
37
  public function get_categories() {
42
  // Adding the controls fields for the premium carousel
43
  // This will controls the animation, colors and background, dimensions etc
44
  protected function _register_controls() {
45
+ $this->start_controls_section('premium_carousel_global_settings',
 
46
  [
47
+ 'label' => esc_html__( 'Carousel' , 'premium-addons-for-elementor' )
48
  ]
49
  );
50
 
51
+ $this->add_control('premium_carousel_content_type',
 
52
  [
53
  'label' => esc_html__( 'Content Type', 'premium-addons-for-elementor' ),
54
  'description' => esc_html__( 'How templates are selected', 'premium-addons-for-elementor' ),
57
  'select' => esc_html__( 'Select Field', 'premium-addons-for-elementor' ),
58
  'repeater' => esc_html__( 'Repeater', 'premium-addons-for-elementor' )
59
  ],
60
+ 'default' => 'select'
61
  ]
62
  );
63
 
64
+ $this->add_control('premium_carousel_slider_content',
 
65
  [
66
+ 'label' => esc_html__( 'Templates', 'premium-addons-for-elementor' ),
67
  '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' ),
68
+ 'type' => Controls_Manager::SELECT2,
69
+ 'options' => $this->getTemplateInstance()->get_elementor_page_list(),
70
+ 'multiple' => true,
71
  'condition' => [
72
  'premium_carousel_content_type' => 'select'
73
  ]
76
 
77
  $repeater = new REPEATER();
78
 
79
+ $repeater->add_control('premium_carousel_repeater_item',
80
+ [
81
+ 'label' => esc_html__( 'Content', 'premium-addons-for-elementor' ),
82
+ 'type' => Controls_Manager::SELECT2,
83
+ 'options' => $this->getTemplateInstance()->get_elementor_page_list()
84
+ ]
85
+ );
 
86
 
87
+ $this->add_control('premium_carousel_templates_repeater',
 
88
  [
89
  'label' => esc_html__('Templates', 'premium-addons-for-elementor'),
90
  'type' => Controls_Manager::REPEATER,
97
  );
98
 
99
 
100
+ $this->add_control('premium_carousel_slider_type',
 
101
  [
102
  'label' => esc_html__( 'Type', 'premium-addons-for-elementor' ),
103
  'description' => esc_html__( 'Set a navigation type', 'premium-addons-for-elementor' ),
106
  'horizontal' => esc_html__( 'Horizontal', 'premium-addons-for-elementor' ),
107
  'vertical' => esc_html__( 'Vertical', 'premium-addons-for-elementor' )
108
  ],
109
+ 'default' => 'horizontal'
110
  ]
111
  );
112
 
113
+ $this->add_control('premium_carousel_slides_to_show',
 
114
  [
115
  'label' => esc_html__( 'Appearance', 'premium-addons-for-elementor' ),
116
  'type' => Controls_Manager::SELECT,
122
  ]
123
  );
124
 
125
+ $this->add_control('premium_carousel_responsive_desktop',
 
126
  [
127
  'label' => esc_html__( 'Desktop Slides', 'premium-addons-for-elementor' ),
128
  'type' => Controls_Manager::NUMBER,
130
  ]
131
  );
132
 
133
+ $this->add_control('premium_carousel_responsive_tabs',
 
134
  [
135
  'label' => esc_html__( 'Tabs Slides', 'premium-addons-for-elementor' ),
136
  'type' => Controls_Manager::NUMBER,
138
  ]
139
  );
140
 
141
+ $this->add_control('premium_carousel_responsive_mobile',
 
142
  [
143
  'label' => esc_html__( 'Mobile Slides', 'premium-addons-for-elementor' ),
144
  'type' => Controls_Manager::NUMBER,
148
 
149
  $this->end_controls_section();
150
 
151
+ $this->start_controls_section('premium_carousel_slides_settings',
 
152
  [
153
  'label' => esc_html__( 'Slides\' Settings' , 'premium-addons-for-elementor' )
154
  ]
155
  );
156
 
157
+ $this->add_control('premium_carousel_loop',
 
158
  [
159
  'label' => esc_html__( 'Infinite Loop', 'premium-addons-for-elementor' ),
160
  'type' => Controls_Manager::SWITCHER,
163
  ]
164
  );
165
 
166
+ $this->add_control('premium_carousel_speed',
 
167
  [
168
  'label' => esc_html__( 'Transition Speed', 'premium-addons-for-elementor' ),
169
  'description' => esc_html__( 'Set a navigation speed value. The value will be counted in milliseconds (ms)', 'premium-addons-for-elementor' ),
172
  ]
173
  );
174
 
175
+ $this->add_control('premium_carousel_autoplay',
 
176
  [
177
  'label' => esc_html__( 'Autoplay Slides‏', 'premium-addons-for-elementor' ),
178
  'description' => esc_html__( 'Slide will start automatically', 'premium-addons-for-elementor' ),
181
  ]
182
  );
183
 
184
+ $this->add_control('premium_carousel_autoplay_speed',
 
185
  [
186
  'label' => esc_html__( 'Autoplay Speed', 'premium-addons-for-elementor' ),
187
  'description' => esc_html__( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
201
  ]
202
  );
203
 
204
+ $this->add_control('premium_carousel_extra_class',
 
205
  [
206
  'label' => esc_html__( 'Extra Class', 'premium-addons-for-elementor' ),
207
  'type' => Controls_Manager::TEXT,
211
 
212
  $this->end_controls_section();
213
 
214
+ $this->start_controls_section('premium_carousel_navigation',
 
215
  [
216
+ 'label' => esc_html__( 'Navigation', 'premium-addons-for-elementor' ),
217
  'tab' => Controls_Manager::TAB_STYLE
218
  ]
219
  );
221
  $this->add_control('premium_carousel_arrow_heading',
222
  [
223
  'label' => esc_html__('Arrows','premium-addons-for-elementor'),
224
+ 'type' => Controls_manager::HEADING
225
+ ]
226
+ );
227
 
228
+ $this->add_control('premium_carousel_navigation_show',
 
229
  [
230
  'label' => esc_html__( 'Arrows', 'premium-addons-for-elementor' ),
231
  'description' => esc_html__( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
234
  ]
235
  );
236
 
237
+ $this->add_control('premium_carousel_arrow_icon_next',
 
238
  [
239
+ 'label' => esc_html__( 'Right Icon', 'premium-addons-for-elementor' ),
240
+ 'type' => Controls_Manager::CHOOSE,
241
+ 'options' => [
242
+ 'right_arrow_bold' => [
243
  'icon' => 'fa fa-arrow-right',
244
  ],
245
+ 'right_arrow_long' => [
246
  'icon' => 'fa fa-long-arrow-right',
247
  ],
248
  'right_arrow_long_circle' => [
255
  'icon' => 'fa fa-chevron-right',
256
  ]
257
  ],
258
+ 'default' => 'right_arrow_angle',
259
  'condition' => [
260
+ 'premium_carousel_navigation_show' => 'yes',
261
+ 'premium_carousel_slider_type!' => 'vertical'
262
  ]
263
  ]
264
  );
265
 
266
  // If the carousel type vertical
267
+ $this->add_control('premium_carousel_arrow_icon_next_ver',
 
268
  [
269
  'label' => esc_html__( 'Bottom Icon', 'premium-addons-for-elementor' ),
270
  'type' => Controls_Manager::CHOOSE,
287
  ],
288
  'default' => 'right_arrow_angle',
289
  'condition' => [
290
+ 'premium_carousel_navigation_show' => 'yes',
291
+ 'premium_carousel_slider_type' => 'vertical',
292
  ]
293
  ]
294
  );
295
 
296
  // If carousel slider is vertical type
297
+ $this->add_control('premium_carousel_arrow_icon_prev_ver',
 
298
  [
299
+ 'label' => esc_html__( 'Top Icon', 'premium-addons-for-elementor' ),
300
+ 'type' => Controls_Manager::CHOOSE,
301
+ 'options' => [
302
  'left_arrow_bold' => [
303
  'icon' => 'fa fa-arrow-up',
304
  ],
317
  ],
318
  'default' => 'left_arrow_angle',
319
  'condition' => [
320
+ 'premium_carousel_navigation_show' => 'yes',
321
+ 'premium_carousel_slider_type' => 'vertical',
322
  ]
323
  ]
324
  );
325
 
326
+ $this->add_control('premium_carousel_arrow_icon_prev',
 
327
  [
328
+ 'label' => esc_html__( 'Left Icon', 'premium-addons-for-elementor' ),
329
+ 'type' => Controls_Manager::CHOOSE,
330
+ 'options' => [
331
  'left_arrow_bold' => [
332
  'icon' => 'fa fa-arrow-left',
333
  ],
352
  ]
353
  );
354
 
355
+ $this->add_control('premium_carousel_arrow_style',
 
356
  [
357
  'label' => esc_html__( 'Style', 'premium-addons-for-elementor' ),
358
  'type' => Controls_Manager::SELECT,
370
  ]
371
  );
372
 
373
+ $this->add_control('premium_carousel_arrow_color',
 
374
  [
375
  'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
376
  'type' => Controls_Manager::COLOR,
387
  ]
388
  );
389
 
390
+ $this->add_control('premium_carousel_arrow_size',
 
391
  [
392
+ 'label' => esc_html__( 'Size', 'premium-addons-for-elementor' ),
393
+ 'type' => Controls_Manager::SLIDER,
394
+ 'default' => [
395
  'size' => 14,
396
  ],
397
+ 'range' => [
398
  'px' => [
399
  'min' => 0,
400
  'max' => 60
403
  'condition' => [
404
  'premium_carousel_navigation_show' => 'yes'
405
  ],
406
+ 'selectors' => [
407
  '{{WRAPPER}} .premium-carousel-wrapper .slick-arrow' => 'font-size: {{SIZE}}{{UNIT}};',
408
  ],
409
  ]
410
  );
411
 
412
+ $this->add_control('premium_carousel_arrow_bg_color',
 
413
  [
414
  'label' => esc_html__( 'Background Color', 'premium-addons-for-elementor' ),
415
  'type' => Controls_Manager::COLOR,
420
  'condition' => [
421
  'premium_carousel_arrow_style' => [ 'circle-bg', 'square-bg' ]
422
  ],
423
+ 'selectors' => [
424
  '{{WRAPPER}} .premium-carousel-wrapper .circle-bg' => 'background: {{VALUE}};',
425
  '{{WRAPPER}} .premium-carousel-wrapper .square-bg' => 'background: {{VALUE}};',
426
  ],
427
  ]
428
  );
429
 
430
+ $this->add_control('premium_carousel_arrow_border_color',
 
431
  [
432
  'label' => esc_html__( 'Border Color', 'premium-addons-for-elementor' ),
433
  'type' => Controls_Manager::COLOR,
438
  'condition' => [
439
  'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
440
  ],
441
+ 'selectors' => [
442
  '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border: solid {{VALUE}};',
443
  '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border: solid {{VALUE}};',
444
  ],
445
  ]
446
  );
447
 
448
+ $this->add_control('premium_carousel_border_size',
 
449
  [
450
+ 'label' => esc_html__( 'Border Size', 'premium-addons-for-elementor' ),
451
+ 'type' => Controls_Manager::SLIDER,
452
+ 'default' => [
453
  'size' => 1,
454
  ],
455
+ 'range' => [
456
  'px' => [
457
  'min' => 0,
458
  'max' => 60
461
  'condition' => [
462
  'premium_carousel_arrow_style' => [ 'circle-border', 'square-border' ]
463
  ],
464
+ 'selectors' => [
465
  '{{WRAPPER}} .premium-carousel-wrapper .square-border' => 'border-width: {{SIZE}}{{UNIT}};',
466
  '{{WRAPPER}} .premium-carousel-wrapper .circle-border' => 'border-width: {{SIZE}}{{UNIT}};',
467
  ],
470
 
471
  $this->add_control('premium_carousel_arrow_position',
472
  [
473
+ 'label' => esc_html__('Position (PX)', 'premium-addons-for-elementor'),
474
+ 'type' => Controls_Manager::SLIDER,
475
+ 'range' => [
476
  'px' => [
477
  'min' => -50,
478
  'max' => 1,
491
  'type' => Controls_manager::HEADING,
492
  ]);
493
 
494
+ $this->add_control('premium_carousel_dot_navigation_show',
 
495
  [
496
  'label' => esc_html__( 'Dots', 'premium-addons-for-elementor' ),
497
  'description' => esc_html__( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
500
  ]
501
  );
502
 
503
+ $this->add_control('premium_carousel_dot_icon',
 
504
  [
505
+ 'label' => esc_html__( 'Icon', 'premium-addons-for-elementor' ),
506
+ 'type' => Controls_Manager::CHOOSE,
507
+ 'options' => [
508
  'square_white' => [
509
  'icon' => 'fa fa-square-o',
510
  ],
528
  ]
529
  );
530
 
531
+ $this->add_control('premium_carousel_dot_navigation_color',
 
532
  [
533
  'label' => esc_html__( 'Color', 'premium-addons-for-elementor' ),
534
  'type' => Controls_Manager::COLOR,
545
  ]
546
  );
547
 
548
+ $this->add_control('premium_carousel_dot_navigation_active_color',
 
549
  [
550
  'label' => esc_html__( 'Active Color', 'premium-addons-for-elementor' ),
551
  'type' => Controls_Manager::COLOR,
562
  ]
563
  );
564
 
565
+ $this->add_control('premium_carousel_navigation_effect',
 
566
  [
567
  'label' => esc_html__( 'Ripple Effect', 'premium-addons-for-elementor' ),
568
  'description' => esc_html__( 'Enable a ripple effect when the active dot is hovered/clicked', 'premium-addons-for-elementor' ),
573
  ]
574
  );
575
 
576
+ $this->add_control('premium_carousel_navigation_effect_border_color',
 
577
  [
578
  'label' => esc_html__( 'Ripple Color', 'premium-addons-for-elementor' ),
579
  'type' => Controls_Manager::COLOR,
593
 
594
  /*First Border Radius*/
595
  $this->add_control('premium_carousel_navigation_effect_border_radius',
596
+ [
597
+ 'label' => esc_html__('Border Radius', 'premium-addons-for-elementor'),
598
+ 'type' => Controls_Manager::SLIDER,
599
+ 'size_units' => ['px', '%', 'em'],
600
+ 'condition' => [
601
+ 'premium_carousel_dot_navigation_show' => 'yes',
602
+ 'premium_carousel_navigation_effect' => 'yes'
603
+ ],
604
+ 'selectors' => [
605
+ '{{WRAPPER}} .premium-carousel-wrapper.hvr-ripple-out ul.slick-dots li.slick-active:before' => 'border-radius: {{SIZE}}{{UNIT}};'
 
606
  ]
607
+ ]
608
+ );
609
 
610
  $this->end_controls_section();
611
 
612
+ $this->start_controls_section('premium-carousel-advance-settings',
 
613
  [
614
+ 'label' => esc_html__( 'Additional Settings' , 'premium-addons-for-elementor' ),
615
  'tab' => Controls_Manager::TAB_STYLE
616
  ]
617
  );
618
 
619
+ $this->add_control('premium_carousel_draggable_effect',
 
620
  [
621
  'label' => esc_html__( 'Draggable Effect', 'premium-addons-for-elementor' ),
622
  'description' => esc_html__( 'Allow the slides to be dragged by mouse click', 'premium-addons-for-elementor' ),
625
  ]
626
  );
627
 
628
+ $this->add_control('premium_carousel_touch_move',
 
629
  [
630
  'label' => esc_html__( 'Touch Move', 'premium-addons-for-elementor' ),
631
  'description' => esc_html__( 'Enable slide moving with touch', 'premium-addons-for-elementor' ),
634
  ]
635
  );
636
 
637
+ $this->add_control('premium_carousel_RTL_Mode',
 
638
  [
639
  'label' => esc_html__( 'RTL Mode', 'premium-addons-for-elementor' ),
640
  'description' => esc_html__( 'Turn on RTL mode if your language starts from right to left', 'premium-addons-for-elementor' ),
645
  ]
646
  );
647
 
648
+ $this->add_control('premium_carousel_adaptive_height',
 
649
  [
650
  'label' => esc_html__( 'Adaptive Height', 'premium-addons-for-elementor' ),
651
  'description' => esc_html__( 'Adaptive height setting gives each slide a fixed height to avoid huge white space gaps', 'premium-addons-for-elementor' ),
653
  ]
654
  );
655
 
656
+ $this->add_control('premium_carousel_pausehover',
 
657
  [
658
  'label' => esc_html__( 'Pause on Hover', 'premium-addons-for-elementor' ),
659
  'description' => esc_html__( 'Pause the slider when mouse hover', 'premium-addons-for-elementor' ),
661
  ]
662
  );
663
 
664
+ $this->add_control('premium_carousel_center_mode',
 
665
  [
666
  'label' => esc_html__( 'Center Mode', 'premium-addons-for-elementor' ),
667
  'description' => esc_html__( 'Center mode enables a centered view with partial next/previous slides. Animations and all visible scroll type doesn\'t work with this mode', 'premium-addons-for-elementor' ),
669
  ]
670
  );
671
 
672
+ $this->add_control('premium_carousel_space_btw_items',
 
673
  [
674
  'label' => esc_html__( 'Slides\' Spacing', 'premium-addons-for-elementor' ),
675
  'description' => esc_html__('Set a spacing value in pixels (px)', 'premium-addons-for-elementor'),
680
  }
681
 
682
  protected function render() {
683
+
684
  $settings = $this->get_settings();
685
+
686
  $arrows_position = $settings['premium_carousel_arrow_position']['size'] . 'px';
687
+
688
+ $vertical = $settings['premium_carousel_slider_type'] == 'vertical' ? true : false;
 
 
 
 
 
689
  // responsive carousel set up
690
 
691
  $slides_on_desk = $settings['premium_carousel_responsive_desktop'];
700
  $slides_on_tabs = $settings['premium_carousel_responsive_tabs'];
701
  $slides_on_mob = $settings['premium_carousel_responsive_mobile'];
702
 
703
+ if( !empty( $settings['premium_carousel_responsive_tabs'] ) ) {
704
  $slides_on_tabs = $slides_on_desk;
705
  }
706
 
707
+ if( !empty ( $settings['premium_carousel_responsive_mobile'] ) ) {
708
  $slides_on_mob = $slides_on_desk;
709
  }
710
 
711
  $responsive = '[{breakpoint: 1025,settings: {slidesToShow: ' . $slides_on_desk . ',slidesToScroll: ' . $slidesToScroll . '}},{breakpoint: 769,settings: {slidesToShow: ' . $slides_on_tabs . ',slidesToScroll: ' . $slides_on_tabs . '}},{breakpoint: 481,settings: {slidesToShow: ' . $slides_on_mob . ',slidesToScroll: ' . $slides_on_mob . '}}]';
712
 
713
+ $infinite = $settings['premium_carousel_loop'] == 'yes' ? true : false;
714
+
715
+ $speed = !empty( $settings['premium_carousel_speed'] ) ? $settings['premium_carousel_speed'] : '';
716
+
717
+ $autoplay = $settings['premium_carousel_autoplay'] == 'yes' ? true : false;
718
+
719
+ $autoplaySpeed = !empty( $settings['premium_carousel_autoplay_speed'] ) ? $settings['premium_carousel_autoplay_speed'] : '';
720
+
721
+ $draggable = $settings['premium_carousel_draggable_effect'] == 'yes' ? true : false;
 
 
722
 
723
+ $touchMove = $settings['premium_carousel_touch_move'] == 'yes' ? true : false;
724
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
725
  $dir = '';
726
+ $rtl = false;
727
+
728
  if( $settings['premium_carousel_RTL_Mode'] == 'yes' ) {
729
  $rtl = true;
730
  $dir = 'dir="rtl"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
  }
732
+
733
+ $adaptiveHeight = $settings['premium_carousel_adaptive_height'] == 'yes' ? true : false;
734
+
735
+ $pauseOnHover = $settings['premium_carousel_pausehover'] == 'yes' ? true : false;
736
+
737
+ $centerMode = $settings['premium_carousel_center_mode'] == 'yes' ? true : false;
738
+
739
+ $centerPadding = !empty( $settings['premium_carousel_space_btw_items'] ) ? $settings['premium_carousel_space_btw_items'] ."px" : '';
740
+
741
  // Navigation arrow setting setup
742
  if( $settings['premium_carousel_navigation_show'] == 'yes') {
743
  $arrows = true;
871
  $animation_class = $settings['premium_carousel_animation_list'];
872
  $animation = 'class="item-wrapper" data-animation="animated ' . $animation_class .'"';
873
 
874
+ $dot_anim = $settings['premium_carousel_navigation_effect'] == 'yes' ? 'hvr-ripple-out' : '';
 
 
 
 
875
 
876
  $carousel_settings = [
877
  'vertical' => $vertical,
909
  }
910
 
911
  $premium_elements_frontend = new Frontend;
912
+
913
+ $this->add_render_attribute( 'carousel', 'id', 'premium-carousel-wrapper-' . esc_attr( $this->get_id() ) );
914
+
915
+ $this->add_render_attribute( 'carousel', 'class', [
916
+ 'premium-carousel-wrapper',
917
+ $dot_anim,
918
+ 'carousel-wrapper-' . esc_attr( $this->get_id() ),
919
+ $extra_class,
920
+ $dir
921
+ ] );
922
+
923
+ $this->add_render_attribute( 'carousel', 'data-settings', wp_json_encode( $carousel_settings ) );
924
 
925
  ?>
926
 
927
+ <div <?php echo $this->get_render_attribute_string('carousel'); ?>>
928
+ <div id="premium-carousel-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-carousel-inner">
929
+ <?php
930
+ foreach( $premium_elements_page_id as $elementor_post_id ) :
931
+ ?>
932
+ <div <?php echo $animation; ?>>
933
+ <?php echo $premium_elements_frontend->get_builder_content( $elementor_post_id, true ); ?>
934
+ </div>
935
+ <?php endforeach; ?>
936
+ </div>
937
+ </div>
938
+ <style>
939
+ <?php if(!empty($settings['premium_carousel_arrow_position']['size'])) : ?>
940
+ #premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?> a.carousel-arrow.carousel-next {
941
+ right: <?php echo $arrows_position; ?>
942
+ }
943
+ #premium-carousel-wrapper-<?php echo esc_attr( $this->get_id() ); ?> a.carousel-arrow.carousel-prev {
944
+ left: <?php echo $arrows_position; ?>
945
+ }
946
+ <?php endif; ?>
947
+ </style>
 
948
  <?php
949
  }
950
  }
widgets/premium-fancytext.php CHANGED
@@ -478,22 +478,26 @@ class Premium_Fancytext extends Widget_Base {
478
  ];
479
  }
480
 
481
- ?>
482
 
 
 
483
 
484
- <div class="premium-fancy-text-wrapper" data-settings='<?php echo wp_json_encode($fancytext_settings); ?>'>
485
- <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_prefix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
486
-
487
- <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?><span id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" ></span>
488
- <?php else : ?>
489
- <div id="premium_fancy_text_<?php echo esc_attr( $this->get_id() ); ?>" class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
490
- <ul>
491
- <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) : ?><?php if ( ! empty( $item['premium_text_strings_text_field'] ) ) : ?><?php echo "<li class='premium-fancy-list-items' >".esc_attr( $item['premium_text_strings_text_field'] )."</li>"; ?><?php endif; ?><?php endforeach; ?>
492
- </ul>
 
 
 
 
 
493
  </div>
494
- <?php endif; ?>
495
- <span class="premium-suffix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_suffix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_suffix_text'] ), true ); ?></span></span>
496
- </div>
497
  <?php
498
  }
499
  }
478
  ];
479
  }
480
 
481
+ ?>
482
 
483
+ <div class="premium-fancy-text-wrapper" data-settings='<?php echo wp_json_encode($fancytext_settings); ?>'>
484
+ <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_prefix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
485
 
486
+ <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?>
487
+ <span class="premium-fancy-text" ></span>
488
+ <?php else : ?>
489
+ <div class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
490
+ <ul>
491
+ <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) :
492
+ if ( ! empty( $item['premium_text_strings_text_field'] ) ) :
493
+ echo "<li class='premium-fancy-list-items' >" . esc_attr( $item['premium_text_strings_text_field'] ) . "</li>";
494
+ endif;
495
+ endforeach; ?>
496
+ </ul>
497
+ </div>
498
+ <?php endif; ?>
499
+ <span class="premium-suffix-text"><span <?php echo $this->get_render_attribute_string('premium_fancy_suffix_text'); ?>><?php echo wp_kses( ( $settings['premium_fancy_suffix_text'] ), true ); ?></span></span>
500
  </div>
 
 
 
501
  <?php
502
  }
503
  }
widgets/premium-grid.php CHANGED
@@ -117,9 +117,14 @@ class Premium_Grid extends Widget_Base {
117
  'type' => Controls_Manager::NUMBER,
118
  'description' => esc_html__('Put the index of the default active category, default is 1', 'premium-addons-for-elementor'),
119
  'default' => 1,
120
- 'condition' => [
121
- 'premium_gallery_first_cat_switcher!' => 'yes'
122
- ]
 
 
 
 
 
123
  ]
124
  );
125
 
@@ -354,14 +359,6 @@ class Premium_Grid extends Widget_Base {
354
  ]
355
  );
356
 
357
- $this->add_control('premium_gallery_filter',
358
- [
359
- 'label' => esc_html__( 'Filter', 'premium-addons-for-elementor' ),
360
- 'type' => Controls_Manager::SWITCHER,
361
- 'default' => 'yes'
362
- ]
363
- );
364
-
365
  $this->add_control('premium_gallery_light_box',
366
  [
367
  'label' => esc_html__( 'Lightbox', 'premium-addons-for-elementor' ),
@@ -1092,260 +1089,133 @@ class Premium_Grid extends Widget_Base {
1092
  'active_cat'=> $category_formatted
1093
  ];
1094
 
 
1095
 
1096
- ?>
1097
- <div id="premium-img-gallery-<?php echo esc_attr($this->get_id()); ?>" class="premium-img-gallery">
1098
- <?php if($filter == 'yes') : ?>
1099
- <div class="premium-img-gallery-filter">
1100
- <ul class="premium-gallery-cats-container">
1101
- <?php if( 'yes' == $settings['premium_gallery_first_cat_switcher'] ) : ?>
1102
- <li><a href="javascript:;" class="category active" data-filter="*"><span><?php echo $settings['premium_gallery_first_cat_label']; ?></span></a></li>
1103
- <?php endif; ?>
1104
- <?php foreach( $settings['premium_gallery_cats_content'] as $index => $category ) : ?>
1105
- <?php if(!empty($category['premium_gallery_img_cat'] ) ) :
1106
-
1107
- $cat_filtered = $this->filter_cats($category['premium_gallery_img_cat']);
1108
- $cat_list_key = 'premium_grid_category_' . $index;
1109
- if( 'yes' != $settings['premium_gallery_first_cat_switcher'] && $settings['premium_gallery_active_cat'] == $index ) {
1110
- $this->add_render_attribute($cat_list_key,
1111
- 'class',
1112
- 'active'
1113
- );
1114
- }
1115
-
1116
- $this->add_render_attribute($cat_list_key,
1117
- 'class',
1118
- array(
1119
- 'category',
1120
- 'elementor-repeater-item-' . $category['_id']
1121
- )
1122
- );
1123
-
1124
- ?>
1125
- <li><a href="javascript:;" <?php echo $this->get_render_attribute_string($cat_list_key); ?> data-filter=".<?php echo esc_attr( $cat_filtered ); ?>"><span><?php echo esc_attr( $category['premium_gallery_img_cat'] ); ?></span></a></li>
1126
- <?php endif; ?>
1127
- <?php endforeach; ?>
1128
- </ul>
1129
- </div>
1130
- <div class="premium-gallery-container js-isotope <?php echo esc_attr($number_columns); ?>" data-settings='<?php echo wp_json_encode($grid_settings); ?>'>
1131
- <?php foreach( $settings['premium_gallery_img_content'] as $image ) :
1132
- $alt = esc_attr( Control_Media::get_image_alt( $image['premium_gallery_img'] ) );
1133
- ?>
1134
- <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1135
- <div class="pa-gallery-img <?php echo esc_attr($layout); ?>" onclick="">
1136
- <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1137
- <?php if($settings['premium_gallery_img_size_select'] == 'one_size'):
1138
- $image_src = $image['premium_gallery_img'];
1139
- $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1140
- if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
1141
- ?>
1142
- <img src="<?php echo $image_src_size; ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
1143
- <?php else : ?>
1144
- <img src="<?php echo esc_url($image['premium_gallery_img']['url']); ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
1145
- <?php endif; ?>
1146
- </div>
1147
- <?php if($layout == 'default') : ?>
1148
- <div class="pa-gallery-icons-wrapper">
1149
- <div class="pa-gallery-icons-inner-container">
1150
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1151
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1152
- <?php endif; ?>
1153
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1154
- $icon_link = $image['premium_gallery_img_link']['url'];
1155
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1156
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1157
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1158
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link') :
1159
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1160
- ?>
1161
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1162
- <?php endif; ?>
1163
- </div>
1164
- </div>
1165
- <div class="premium-gallery-caption">
1166
- <?php if(!empty($image['premium_gallery_img_name'])):?>
1167
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1168
- <?php endif; ?>
1169
- <?php if(!empty($image['premium_gallery_img_desc'])):?>
1170
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1171
- <?php endif; ?>
1172
- </div>
1173
- <?php elseif( $layout == 'style1' ) : ?>
1174
- <div class="pa-gallery-icons-wrapper">
1175
- <div class="pa-gallery-icons-inner-container">
1176
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1177
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1178
- <?php endif; ?>
1179
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1180
- $icon_link = $image['premium_gallery_img_link']['url'];
1181
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1182
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1183
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1184
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link') :
1185
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1186
  ?>
1187
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1188
- <?php endif; ?>
1189
- </div>
1190
- </div>
1191
- <div class="premium-gallery-caption">
1192
- <?php if(!empty($image['premium_gallery_img_name'])):?>
1193
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1194
- <?php endif; ?>
1195
- <?php if(!empty($image['premium_gallery_img_desc'])):?>
1196
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1197
- <?php endif; ?>
1198
- </div>
1199
- <?php else: ?>
1200
- <div class="pa-gallery-icons-caption-container">
1201
- <div class="pa-gallery-icons-caption-cell">
1202
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1203
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1204
- <?php endif; ?>
1205
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1206
- $icon_link = $image['premium_gallery_img_link']['url'];
1207
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1208
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1209
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1210
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link') :
1211
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1212
  ?>
1213
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1214
- <?php endif; ?>
1215
- <div class="premium-gallery-caption">
1216
- <?php if(!empty($image['premium_gallery_img_name'])):?>
1217
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1218
  <?php endif; ?>
1219
- <?php if(!empty($image['premium_gallery_img_desc'])):?>
1220
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
 
 
 
 
1221
  <?php endif; ?>
1222
- </div>
 
 
 
 
 
 
 
 
 
 
1223
  </div>
1224
- </div>
1225
- <?php endif; ?>
1226
- <?php if( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1227
- $icon_link = $image['premium_gallery_img_link']['url'];
1228
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1229
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1230
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1231
- <?php elseif( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1232
- $icon_link = get_permalink($image['premium_gallery_img_existing']); ?>
1233
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1234
- <?php endif; ?>
1235
-
1236
- </div>
1237
- </div>
1238
- <?php endforeach; ?>
1239
- </div>
1240
- <?php else: ?>
1241
- <div class="premium-gallery-container js-isotope <?php echo esc_attr($number_columns); ?>" data-settings='<?php echo wp_json_encode($grid_settings); ?>'>
1242
- <?php foreach( $settings['premium_gallery_img_content'] as $image ) : ?>
1243
- <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1244
- <div class="pa-gallery-img <?php echo esc_attr($layout); ?>" onclick="">
1245
- <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1246
- <?php if($settings['premium_gallery_img_size_select'] == 'one_size') :
1247
- $image_src = $image['premium_gallery_img'];
1248
- $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1249
- if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;?>
1250
- <img src="<?php echo esc_url($image_src_size); ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
1251
- <?php else : ?>
1252
- <img src="<?php echo esc_url($image['premium_gallery_img']['url']); ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
1253
- <?php endif; ?>
1254
- </div>
1255
- <?php if($layout == 'default') : ?>
1256
- <div class="pa-gallery-icons-wrapper">
1257
- <div class="pa-gallery-icons-inner-container">
1258
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1259
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1260
- <?php endif; ?>
1261
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1262
- $icon_link = $image['premium_gallery_img_link']['url'];
1263
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1264
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1265
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1266
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1267
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1268
- ?>
1269
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1270
  <?php endif; ?>
1271
- </div>
1272
- </div>
1273
- <div class="premium-gallery-caption">
1274
- <?php if(!empty($image['premium_gallery_img_name'])):?>
1275
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1276
- <?php endif; ?>
1277
- <?php if(!empty($image['premium_gallery_img_desc'])):?>
1278
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1279
- <?php endif; ?>
1280
- </div>
1281
- <?php elseif( $layout == 'style1' ) : ?>
1282
- <div class="pa-gallery-icons-wrapper">
1283
- <div class="pa-gallery-icons-inner-container">
1284
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1285
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1286
- <?php endif; ?>
1287
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1288
- $icon_link = $image['premium_gallery_img_link']['url'];
1289
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1290
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1291
  <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1292
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1293
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1294
- ?>
1295
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1296
- <?php endif; ?>
1297
- </div>
1298
- </div>
1299
- <div class="premium-gallery-caption">
1300
  <?php if(!empty($image['premium_gallery_img_name'])):?>
1301
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1302
  <?php endif; ?>
1303
  <?php if(!empty($image['premium_gallery_img_desc'])):?>
1304
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1305
  <?php endif; ?>
1306
- </div>
1307
- <?php else: ?>
1308
- <div class="pa-gallery-icons-caption-container">
1309
- <div class="pa-gallery-icons-caption-cell">
1310
- <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1311
- <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1312
  <?php endif; ?>
1313
- <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1314
  $icon_link = $image['premium_gallery_img_link']['url'];
1315
  $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1316
  $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1317
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1318
- <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1319
- $icon_link = get_permalink($image['premium_gallery_img_existing']);
1320
- ?>
1321
- <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1322
- <?php endif; ?>
1323
- <div class="premium-gallery-caption">
1324
- <?php if(!empty($image['premium_gallery_img_name'])):?>
1325
- <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1326
- <?php endif; ?>
1327
- <?php if(!empty($image['premium_gallery_img_desc'])):?>
1328
- <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1329
- <?php endif; ?>
1330
- </div>
1331
- </div>
1332
- </div>
1333
- <?php endif; ?>
1334
- <?php if( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1335
- $icon_link = $image['premium_gallery_img_link']['url'];
1336
- $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1337
- $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1338
  <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1339
- <?php elseif( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1340
- $icon_link = get_permalink($image['premium_gallery_img_existing']); ?>
1341
- <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1342
- <?php endif; ?>
1343
  </div>
 
1344
  </div>
1345
- <?php endforeach; ?>
1346
  </div>
1347
- <?php endif; ?>
1348
- </div>
1349
  <?php if($settings['premium_gallery_responsive_switcher'] == 'yes') : ?>
1350
  <style>
1351
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
117
  'type' => Controls_Manager::NUMBER,
118
  'description' => esc_html__('Put the index of the default active category, default is 1', 'premium-addons-for-elementor'),
119
  'default' => 1,
120
+ ]
121
+ );
122
+
123
+ $this->add_control('premium_gallery_filter',
124
+ [
125
+ 'label' => esc_html__( 'Filter', 'premium-addons-for-elementor' ),
126
+ 'type' => Controls_Manager::SWITCHER,
127
+ 'default' => 'yes'
128
  ]
129
  );
130
 
359
  ]
360
  );
361
 
 
 
 
 
 
 
 
 
362
  $this->add_control('premium_gallery_light_box',
363
  [
364
  'label' => esc_html__( 'Lightbox', 'premium-addons-for-elementor' ),
1089
  'active_cat'=> $category_formatted
1090
  ];
1091
 
1092
+ $this->add_render_attribute( 'grid', 'id', 'premium-img-gallery-' . esc_attr( $this->get_id() ) );
1093
 
1094
+ $this->add_render_attribute( 'grid', 'class', 'premium-img-gallery' );
1095
+
1096
+ $active_category_index = $settings['premium_gallery_first_cat_switcher'] == 'yes' ? $settings['premium_gallery_active_cat'] - 1 : $settings['premium_gallery_active_cat'];
1097
+
1098
+ $is_all_active = ( 0 > $active_category_index ) ? "active" : "";
1099
+
1100
+ ?>
1101
+
1102
+ <div <?php echo $this->get_render_attribute_string('grid'); ?>>
1103
+ <?php if( $filter == 'yes' ) : ?>
1104
+ <div class="premium-img-gallery-filter">
1105
+ <ul class="premium-gallery-cats-container">
1106
+ <?php if( 'yes' == $settings['premium_gallery_first_cat_switcher'] ) : ?>
1107
+ <li><a href="javascript:;" class="category <?php echo $is_all_active; ?>" data-filter="*"><span><?php echo $settings['premium_gallery_first_cat_label']; ?></span></a></li>
1108
+ <?php endif;
1109
+ foreach( $settings['premium_gallery_cats_content'] as $index => $category ) {
1110
+ if( ! empty( $category['premium_gallery_img_cat'] ) ) {
1111
+ $cat_filtered = $this->filter_cats($category['premium_gallery_img_cat']);
1112
+ $cat_list_key = 'premium_grid_category_' . $index;
1113
+ if( $active_category_index == $index ) {
1114
+ $this->add_render_attribute($cat_list_key,
1115
+ 'class',
1116
+ 'active'
1117
+ );
1118
+ }
1119
+
1120
+ $this->add_render_attribute($cat_list_key,
1121
+ 'class',
1122
+ array(
1123
+ 'category',
1124
+ 'elementor-repeater-item-' . $category['_id']
1125
+ )
1126
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1127
  ?>
1128
+ <li><a href="javascript:;" <?php echo $this->get_render_attribute_string($cat_list_key); ?> data-filter=".<?php echo esc_attr( $cat_filtered ); ?>"><span><?php echo esc_attr( $category['premium_gallery_img_cat'] ); ?></span></a></li>
1129
+ <?php }
1130
+ } ?>
1131
+ </ul>
1132
+ </div>
1133
+ <?php endif; ?>
1134
+ <div class="premium-gallery-container js-isotope <?php echo esc_attr( $number_columns ); ?>" data-settings='<?php echo wp_json_encode($grid_settings); ?>'>
1135
+ <?php foreach( $settings['premium_gallery_img_content'] as $image ) :
1136
+ $alt = esc_attr( Control_Media::get_image_alt( $image['premium_gallery_img'] ) );
1137
+ ?>
1138
+ <div class="premium-gallery-item <?php echo esc_attr( $this->filter_cats( $image['premium_gallery_img_category'] ) ); ?>">
1139
+ <div class="pa-gallery-img <?php echo esc_attr($layout); ?>" onclick="">
1140
+ <div class="pa-gallery-img-container <?php echo esc_attr($settings['premium_gallery_img_effect']); ?>">
1141
+ <?php if($settings['premium_gallery_img_size_select'] == 'one_size') :
1142
+ $image_src = $image['premium_gallery_img'];
1143
+ $image_src_size = Group_Control_Image_Size::get_attachment_image_src( $image_src['id'], 'thumbnail', $settings );
1144
+ if( empty( $image_src_size ) ) : $image_src_size = $image_src['url']; else: $image_src_size = $image_src_size; endif;
 
 
 
 
 
 
 
 
1145
  ?>
1146
+ <img src="<?php echo $image_src_size; ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
1147
+ <?php else : ?>
1148
+ <img src="<?php echo esc_url($image['premium_gallery_img']['url']); ?>" class="pa-gallery-image" alt="<?php echo $alt; ?>">
 
 
1149
  <?php endif; ?>
1150
+ </div>
1151
+ <?php if( $layout == 'default' || $layout == 'style1' ) : ?>
1152
+ <div class="pa-gallery-icons-wrapper">
1153
+ <div class="pa-gallery-icons-inner-container">
1154
+ <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1155
+ <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
1156
  <?php endif; ?>
1157
+ <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1158
+ $icon_link = $image['premium_gallery_img_link']['url'];
1159
+ $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1160
+ $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1161
+ <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1162
+ <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link') :
1163
+ $icon_link = get_permalink($image['premium_gallery_img_existing']);
1164
+ ?>
1165
+ <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1166
+ <?php endif; ?>
1167
+ </div>
1168
  </div>
1169
+ <div class="premium-gallery-caption">
1170
+ <?php if(!empty($image['premium_gallery_img_name'])):?>
1171
+ <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1172
+ <?php endif; ?>
1173
+ <?php if(!empty($image['premium_gallery_img_desc'])):?>
1174
+ <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1175
+ <?php endif; ?>
1176
+ </div>
1177
+ <?php else: ?>
1178
+ <div class="pa-gallery-icons-caption-container">
1179
+ <div class="pa-gallery-icons-caption-cell">
1180
+ <?php if( 'yes' == $settings['premium_gallery_light_box'] ) : ?>
1181
+ <a href="<?php echo esc_attr( $image['premium_gallery_img']['url'] ); ?>" class="pa-gallery-magnific-image" data-rel="prettyPhoto[premium-grid-<?php echo esc_attr($this->get_id()); ?>]"><span><i class="fa fa-search-plus"></i></span></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1182
  <?php endif; ?>
1183
+ <?php if( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1184
+ $icon_link = $image['premium_gallery_img_link']['url'];
1185
+ $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1186
+ $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
  <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1188
+ <?php elseif( $image['premium_gallery_link_whole'] != 'yes' && $image['premium_gallery_img_link_type'] == 'link') :
1189
+ $icon_link = get_permalink($image['premium_gallery_img_existing']);
1190
+ ?>
1191
+ <a href="<?php echo esc_attr( $icon_link ); ?>" class="pa-gallery-img-link"><span><i class="fa fa-link"></i></span></a>
1192
+ <?php endif; ?>
1193
+ <div class="premium-gallery-caption">
 
 
1194
  <?php if(!empty($image['premium_gallery_img_name'])):?>
1195
+ <span class="premium-gallery-img-name"><?php echo $image['premium_gallery_img_name']; ?></span>
1196
  <?php endif; ?>
1197
  <?php if(!empty($image['premium_gallery_img_desc'])):?>
1198
+ <p class="premium-gallery-img-desc"><?php echo $image['premium_gallery_img_desc']; ?></p>
1199
  <?php endif; ?>
1200
+ </div>
1201
+ </div>
1202
+ </div>
 
 
 
1203
  <?php endif; ?>
1204
+ <?php if( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'url' && !empty($image['premium_gallery_img_link']['url']) ) :
1205
  $icon_link = $image['premium_gallery_img_link']['url'];
1206
  $external = $image['premium_gallery_img_link']['is_external'] ? 'target="_blank"' : '';
1207
  $no_follow = $image['premium_gallery_img_link']['nofollow'] ? 'rel="nofollow"' : ''; ?>
1208
+ <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1209
+ <?php elseif( $image['premium_gallery_link_whole'] == 'yes' && $image['premium_gallery_img_link_type'] == 'link' ) :
1210
+ $icon_link = get_permalink($image['premium_gallery_img_existing']); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1211
  <a href="<?php echo esc_attr( $icon_link ); ?>" <?php echo $external; ?><?php echo $no_follow; ?> class="pa-gallery-whole-link"></a>
1212
+ <?php endif; ?>
1213
+
1214
+ </div>
 
1215
  </div>
1216
+ <?php endforeach; ?>
1217
  </div>
 
1218
  </div>
 
 
1219
  <?php if($settings['premium_gallery_responsive_switcher'] == 'yes') : ?>
1220
  <style>
1221
  @media(min-width: <?php echo $min_size; ?> ) and (max-width:<?php echo $max_size; ?>){
widgets/premium-pricing-table.php CHANGED
@@ -1867,7 +1867,7 @@ class Premium_Pricing_Table extends Widget_Base {
1867
  <?php if($settings['premium_pricing_table_list_switcher'] == 'yes') : ?>
1868
  <div class="premium-pricing-list-container">
1869
  <ul class="premium-pricing-list">
1870
- <?php foreach($settings['premium_fancy_text_list_items'] as $item): echo '<li>' . '<i class="' . esc_attr($item['premium_pricing_list_item_icon']) . '">' . '</i>' . '<span class="premium-pricing-list-span">' . esc_attr($item['premium_pricing_list_item_text']) . '</span>' . '</li>'; ?>
1871
  <?php endforeach; ?>
1872
  </ul>
1873
  </div>
@@ -1881,7 +1881,7 @@ class Premium_Pricing_Table extends Widget_Base {
1881
  <?php endif; ?>
1882
  <?php if($settings['premium_pricing_table_button_switcher'] == 'yes') : ?>
1883
  <div class="premium-pricing-button-container">
1884
- <a class="premium-pricing-price-button" target="_<?php echo esc_attr($settings['premium_pricing_table_button_link_target']); ?>" href="<?php echo esc_url($link_url); ?>">
1885
  <span <?php echo $this->get_render_attribute_string('premium_pricing_table_button_text'); ?>><?php echo $settings['premium_pricing_table_button_text']; ?></span>
1886
  </a>
1887
  </div>
1867
  <?php if($settings['premium_pricing_table_list_switcher'] == 'yes') : ?>
1868
  <div class="premium-pricing-list-container">
1869
  <ul class="premium-pricing-list">
1870
+ <?php foreach( $settings['premium_fancy_text_list_items'] as $item ): echo '<li>' . '<i class="' . esc_attr( $item['premium_pricing_list_item_icon'] ) . '">' . '</i>' . '<span class="premium-pricing-list-span">' . esc_attr( $item['premium_pricing_list_item_text'] ) . '</span>' . '</li>'; ?>
1871
  <?php endforeach; ?>
1872
  </ul>
1873
  </div>
1881
  <?php endif; ?>
1882
  <?php if($settings['premium_pricing_table_button_switcher'] == 'yes') : ?>
1883
  <div class="premium-pricing-button-container">
1884
+ <a class="premium-pricing-price-button" target="_<?php echo esc_attr( $settings['premium_pricing_table_button_link_target'] ); ?>" href="<?php echo esc_url( $link_url ); ?>">
1885
  <span <?php echo $this->get_render_attribute_string('premium_pricing_table_button_text'); ?>><?php echo $settings['premium_pricing_table_button_text']; ?></span>
1886
  </a>
1887
  </div>