PowerPack Addons for Elementor (Instagram Feed, Pricing Table, Forms Stylers, Display Conditions, Free Elementor Widgets and Elementor Templates) - Version 2.1.3

Version Description

  • August 31, 2020 =
  • Fixed: Buttons - Tooltip styling options were not working in buttons widget
  • Fixed: Info Box Carousel - Icon type image was not showing on frontend
  • Fixed: PHP error in template library
Download this release

Release Info

Developer ideaboxcreations
Plugin Icon 128x128 PowerPack Addons for Elementor (Instagram Feed, Pricing Table, Forms Stylers, Display Conditions, Free Elementor Widgets and Elementor Templates)
Version 2.1.3
Comparing to
See all releases

Code changes from version 2.1.2 to 2.1.3

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  == 2.1.2 ==
2
  Release date: August 25, 2020
3
  * Enhancement: Compatibility to Elementor 3.0
1
+ == 2.1.3 ==
2
+ Release date: August 31, 2020
3
+ * Fixed: Buttons - Tooltip styling options were not working in buttons widget
4
+ * Fixed: Info Box Carousel - Icon type image was not showing on frontend
5
+ * Fixed: PHP error in template library
6
+
7
  == 2.1.2 ==
8
  Release date: August 25, 2020
9
  * Enhancement: Compatibility to Elementor 3.0
gruntfile.js CHANGED
@@ -327,7 +327,7 @@ module.exports = function( grunt ) {
327
  // Replace.
328
  replace: {
329
  main: {
330
- src: ['powerpack-elements.php'],
331
  overwrite: true,
332
  replacements: [
333
  {
@@ -335,8 +335,8 @@ module.exports = function( grunt ) {
335
  to: 'Version: <%= pkg.version %>\n'
336
  },
337
  {
338
- from: /IBX_ADMIN_UI_VER', '.*?'/g,
339
- to: 'POWERPACK_ELEMENTS_VER\', \'<%= pkg.version %>\''
340
  },
341
  ]
342
  },
327
  // Replace.
328
  replace: {
329
  main: {
330
+ src: ['powerpack-lite-elementor.php'],
331
  overwrite: true,
332
  replacements: [
333
  {
335
  to: 'Version: <%= pkg.version %>\n'
336
  },
337
  {
338
+ from: /POWERPACK_ELEMENTS_LITE_VER', '.*?'/g,
339
+ to: 'POWERPACK_ELEMENTS_LITE_VER\', \'<%= pkg.version %>\''
340
  },
341
  ]
342
  },
modules/buttons/widgets/buttons.php CHANGED
@@ -79,24 +79,34 @@ class Buttons extends Powerpack_Widget {
79
  * @return array Widget scripts dependencies.
80
  */
81
  public function get_script_depends() {
82
- return array(
83
  'pp-tooltip',
84
  'powerpack-frontend',
85
- );
 
 
 
 
 
 
 
 
 
 
86
  }
 
87
  /**
88
  * Register buttons widget controls.
89
  *
90
  * Adds different input fields to allow the user to change and customize the widget settings.
91
  *
 
92
  * @access protected
93
  */
94
- protected function _register_controls() {
95
 
96
- /*
97
- -----------------------------------------------------------------------------------*/
98
- /*
99
- CONTENT TAB
100
  /*-----------------------------------------------------------------------------------*/
101
 
102
  /**
@@ -104,9 +114,9 @@ class Buttons extends Powerpack_Widget {
104
  */
105
  $this->start_controls_section(
106
  'section_list',
107
- array(
108
- 'label' => __( 'Buttons', 'powerpack' ),
109
- )
110
  );
111
  $repeater = new Repeater();
112
 
@@ -114,384 +124,384 @@ class Buttons extends Powerpack_Widget {
114
 
115
  $repeater->start_controls_tab(
116
  'button_general',
117
- array(
118
  'label' => __( 'Content', 'powerpack' ),
119
- )
120
  );
121
 
122
  $repeater->add_control(
123
  'text',
124
- array(
125
- 'label' => __( 'Text', 'powerpack' ),
126
- 'type' => Controls_Manager::TEXT,
127
- 'default' => __( 'Button #1', 'powerpack' ),
128
- 'placeholder' => __( 'Button #1', 'powerpack' ),
129
- 'dynamic' => array(
130
  'active' => true,
131
- ),
132
- )
133
  );
134
  $repeater->add_control(
135
  'pp_icon_type',
136
- array(
137
- 'label' => __( 'Icon Type', 'powerpack' ),
138
- 'type' => Controls_Manager::CHOOSE,
139
- 'label_block' => false,
140
- 'toggle' => false,
141
- 'default' => 'icon',
142
- 'options' => array(
143
- 'none' => array(
144
  'title' => esc_html__( 'None', 'powerpack' ),
145
  'icon' => 'fa fa-ban',
146
- ),
147
- 'icon' => array(
148
  'title' => esc_html__( 'Icon', 'powerpack' ),
149
  'icon' => 'fa fa-star',
150
- ),
151
- 'image' => array(
152
  'title' => esc_html__( 'Image', 'powerpack' ),
153
  'icon' => 'fa fa-picture-o',
154
- ),
155
- 'text' => array(
156
  'title' => esc_html__( 'Text', 'powerpack' ),
157
  'icon' => 'fa fa-hashtag',
158
- ),
159
- ),
160
- )
161
  );
162
  $repeater->add_control(
163
  'selected_icon',
164
- array(
165
- 'label' => __( 'Icon', 'powerpack' ),
166
- 'type' => Controls_Manager::ICONS,
167
- 'label_block' => true,
168
- 'default' => array(
169
- 'value' => 'fas fa-check',
170
  'library' => 'fa-solid',
171
- ),
172
- 'fa4compatibility' => 'button_icon',
173
- 'condition' => array(
174
  'pp_icon_type' => 'icon',
175
- ),
176
- )
177
  );
178
  $repeater->add_control(
179
  'icon_img',
180
- array(
181
- 'label' => __( 'Image', 'powerpack' ),
182
- 'label_block' => true,
183
- 'type' => Controls_Manager::MEDIA,
184
- 'default' => array(
185
  'url' => Utils::get_placeholder_image_src(),
186
- ),
187
- 'dynamic' => array(
188
- 'active' => true,
189
- ),
190
- 'condition' => array(
191
  'pp_icon_type' => 'image',
192
- ),
193
- )
194
  );
195
  $repeater->add_control(
196
  'icon_text',
197
- array(
198
- 'label' => __( 'Icon Text', 'powerpack' ),
199
- 'label_block' => false,
200
- 'type' => Controls_Manager::TEXT,
201
- 'default' => __( '1', 'powerpack' ),
202
- 'dynamic' => array(
203
- 'active' => true,
204
- ),
205
- 'condition' => array(
206
  'pp_icon_type' => 'text',
207
- ),
208
- )
209
  );
210
 
211
  $repeater->add_control(
212
  'has_tooltip',
213
- array(
214
- 'label' => __( 'Enable Tooltip', 'powerpack' ),
215
- 'type' => Controls_Manager::SWITCHER,
216
- 'default' => 'no',
217
- 'yes' => __( 'Yes', 'powerpack' ),
218
- 'no' => __( 'No', 'powerpack' ),
219
- )
220
  );
221
 
222
  $repeater->add_control(
223
  'tooltip_content',
224
- array(
225
- 'label' => __( 'Tooltip Content', 'powerpack' ),
226
- 'type' => Controls_Manager::TEXTAREA,
227
- 'default' => __( 'I am a tooltip for a button', 'powerpack' ),
228
- 'placeholder' => __( 'I am a tooltip for a button', 'powerpack' ),
229
- 'rows' => 5,
230
- 'condition' => array(
231
- 'has_tooltip' => 'yes',
232
- ),
233
- )
234
  );
235
 
236
  $repeater->add_control(
237
  'link',
238
- array(
239
- 'label' => __( 'Link', 'powerpack' ),
240
- 'type' => Controls_Manager::URL,
241
- 'dynamic' => array(
242
- 'active' => true,
243
- ),
244
- 'label_block' => true,
245
- 'placeholder' => __( 'http://your-link.com', 'powerpack' ),
246
- )
247
  );
248
  $repeater->add_control(
249
  'css_id',
250
- array(
251
  'label' => __( 'CSS ID', 'powerpack' ),
252
  'title' => __( 'Add your custom ID WITHOUT the # key. e.g: my-id', 'powerpack' ),
253
  'label_block' => false,
254
  'type' => Controls_Manager::TEXT,
255
- 'dynamic' => array(
256
- 'active' => true,
257
- ),
258
- )
259
  );
260
  $repeater->add_control(
261
  'css_classes',
262
- array(
263
  'label' => __( 'CSS Classes', 'powerpack' ),
264
  'title' => __( 'Add your custom class WITHOUT the dot. e.g: my-class', 'powerpack' ),
265
  'label_block' => false,
266
  'type' => Controls_Manager::TEXT,
267
- 'dynamic' => array(
268
- 'active' => true,
269
- ),
270
- )
271
  );
272
 
273
  $repeater->end_controls_tab();
274
 
275
  $repeater->start_controls_tab(
276
  'button_layout_tab',
277
- array(
278
  'label' => __( 'Layout', 'powerpack' ),
279
- )
280
  );
281
 
282
  $repeater->add_control(
283
  'single_button_size',
284
- array(
285
- 'label' => __( 'Button Size', 'powerpack' ),
286
- 'type' => Controls_Manager::SELECT,
287
- 'default' => 'default',
288
- 'options' => array(
289
  'default' => __( 'Default', 'powerpack' ),
290
- 'xs' => __( 'Extra Small', 'powerpack' ),
291
- 'sm' => __( 'Small', 'powerpack' ),
292
- 'md' => __( 'Medium', 'powerpack' ),
293
- 'lg' => __( 'Large', 'powerpack' ),
294
- 'xl' => __( 'Extra Large', 'powerpack' ),
295
- 'custom' => __( 'Custom', 'powerpack' ),
296
- ),
297
- )
298
  );
299
 
300
  $repeater->add_responsive_control(
301
  'single_button_width',
302
- array(
303
- 'label' => __( 'Button Width', 'powerpack' ),
304
- 'type' => Controls_Manager::SLIDER,
305
- 'size_units' => array( 'px', '%' ),
306
- 'range' => array(
307
- 'px' => array(
308
- 'min' => 10,
309
- 'max' => 800,
310
- 'step' => 1,
311
- ),
312
- ),
313
- 'selectors' => array(
314
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'width: {{SIZE}}{{UNIT}};',
315
- ),
316
- 'condition' => array(
317
  'single_button_size' => 'custom',
318
- ),
319
- )
320
  );
321
 
322
  $repeater->add_responsive_control(
323
  'single_button_padding',
324
- array(
325
- 'label' => __( 'Padding', 'powerpack' ),
326
- 'type' => Controls_Manager::DIMENSIONS,
327
- 'size_units' => array( 'px', 'em', '%' ),
328
- 'selectors' => array(
329
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
330
- ),
331
- )
332
  );
333
 
334
  $repeater->end_controls_tab();
335
 
336
  $repeater->start_controls_tab(
337
  'button_style_tabs',
338
- array(
339
  'label' => __( 'Style', 'powerpack' ),
340
- )
341
  );
342
 
343
  $repeater->add_group_control(
344
  Group_Control_Typography::get_type(),
345
- array(
346
- 'name' => 'single_title_typography',
347
- 'label' => __( 'Button Typography', 'powerpack' ),
348
- 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
349
- 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-button-title',
350
- )
351
  );
352
 
353
  $repeater->add_responsive_control(
354
  'single_icon_size',
355
- array(
356
- 'label' => __( 'Icon Size', 'powerpack' ),
357
- 'type' => Controls_Manager::SLIDER,
358
- 'range' => array(
359
- 'px' => array(
360
- 'min' => 5,
361
- 'max' => 100,
362
- 'step' => 1,
363
- ),
364
- ),
365
- 'selectors' => array(
366
  '{{WRAPPER}} {{CURRENT_ITEM}} span.pp-button-icon' => 'font-size: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
367
  '{{WRAPPER}} {{CURRENT_ITEM}} .pp-button-icon-image img' => 'width: {{SIZE}}{{UNIT}};',
368
- ),
369
- 'condition' => array(
370
  'pp_icon_type!' => 'none',
371
- ),
372
- )
373
  );
374
 
375
  $repeater->add_control(
376
  'single_normal_options',
377
- array(
378
  'label' => __( 'Normal', 'powerpack' ),
379
  'type' => Controls_Manager::HEADING,
380
  'separator' => 'after',
381
- )
382
  );
383
  $repeater->add_control(
384
  'single_button_bg_color',
385
- array(
386
- 'label' => __( 'Background Color', 'powerpack' ),
387
- 'type' => Controls_Manager::COLOR,
388
- 'default' => '',
389
- 'selectors' => array(
390
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'background: {{VALUE}};',
391
- ),
392
- )
393
  );
394
  $repeater->add_control(
395
  'single_text_color',
396
- array(
397
- 'label' => __( 'Text Color', 'powerpack' ),
398
- 'type' => Controls_Manager::COLOR,
399
- 'default' => '',
400
- 'selectors' => array(
401
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'color: {{VALUE}};',
402
- ),
403
- )
404
  );
405
  $repeater->add_control(
406
  'single_icon_color',
407
- array(
408
- 'label' => __( 'Icon Color', 'powerpack' ),
409
- 'type' => Controls_Manager::COLOR,
410
- 'default' => '',
411
- 'selectors' => array(
412
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
413
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
414
- ),
415
- )
416
  );
417
  $repeater->add_group_control(
418
  Group_Control_Border::get_type(),
419
- array(
420
- 'name' => 'single_button_border',
421
- 'label' => __( 'Border', 'powerpack' ),
422
- 'placeholder' => '1px',
423
- 'default' => '1px',
424
- 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button',
425
- )
426
  );
427
  $repeater->add_control(
428
  'single_button_border_radius',
429
- array(
430
- 'label' => __( 'Border Radius', 'powerpack' ),
431
- 'type' => Controls_Manager::DIMENSIONS,
432
- 'size_units' => array( 'px', '%' ),
433
- 'selectors' => array(
434
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
435
- ),
436
- )
437
  );
438
 
439
  $repeater->add_control(
440
  'single_hover_options',
441
- array(
442
- 'label' => __( 'Hover', 'powerpack' ),
443
- 'type' => Controls_Manager::HEADING,
444
  'separator' => 'after',
445
- )
446
  );
447
 
448
  $repeater->add_control(
449
  'single_button_bg_color_hover',
450
- array(
451
- 'label' => __( 'Background Color', 'powerpack' ),
452
- 'type' => Controls_Manager::COLOR,
453
- 'default' => '',
454
- 'selectors' => array(
455
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'background: {{VALUE}};',
456
- ),
457
- )
458
  );
459
 
460
  $repeater->add_control(
461
  'single_text_color_hover',
462
- array(
463
- 'label' => __( 'Text Color', 'powerpack' ),
464
- 'type' => Controls_Manager::COLOR,
465
- 'default' => '',
466
- 'selectors' => array(
467
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'color: {{VALUE}};',
468
- ),
469
- )
470
  );
471
 
472
  $repeater->add_control(
473
  'single_icon_color_hover',
474
- array(
475
- 'label' => __( 'Icon Color', 'powerpack' ),
476
- 'type' => Controls_Manager::COLOR,
477
- 'default' => '',
478
- 'selectors' => array(
479
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
480
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
481
- ),
482
- )
483
  );
484
 
485
  $repeater->add_control(
486
  'single_border_color_hover',
487
- array(
488
- 'label' => __( 'Border Color', 'powerpack' ),
489
- 'type' => Controls_Manager::COLOR,
490
- 'default' => '',
491
- 'selectors' => array(
492
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'border-color: {{VALUE}};',
493
- ),
494
- )
495
  );
496
 
497
  $repeater->end_controls_tab();
@@ -500,26 +510,24 @@ class Buttons extends Powerpack_Widget {
500
 
501
  $this->add_control(
502
  'buttons',
503
- array(
504
  'label' => __( 'Buttons', 'powerpack' ),
505
  'type' => Controls_Manager::REPEATER,
506
  'show_label' => true,
507
  'fields' => $repeater->get_controls(),
508
  'title_field' => '{{{ text }}}',
509
- 'default' => array(
510
- array(
511
  'text' => __( 'Button #1', 'powerpack' ),
512
- ),
513
- array(
514
  'text' => __( 'Button #2', 'powerpack' ),
515
- ),
516
- ),
517
- )
518
  );
519
  $this->end_controls_section();
520
 
521
- $this->end_controls_section();
522
-
523
  if ( ! is_pp_elements_active() ) {
524
  $this->start_controls_section(
525
  'section_upgrade_powerpack',
@@ -547,170 +555,170 @@ class Buttons extends Powerpack_Widget {
547
  */
548
  $this->start_controls_section(
549
  'button_layout',
550
- array(
551
  'label' => __( 'Layout', 'powerpack' ),
552
  'tab' => Controls_Manager::TAB_STYLE,
553
- )
554
  );
555
  $this->add_control(
556
  'button_size',
557
- array(
558
- 'label' => __( 'Buttons Size', 'powerpack' ),
559
- 'type' => Controls_Manager::SELECT,
560
- 'default' => 'sm',
561
- 'options' => array(
562
  'xs' => __( 'Extra Small', 'powerpack' ),
563
  'sm' => __( 'Small', 'powerpack' ),
564
  'md' => __( 'Medium', 'powerpack' ),
565
  'lg' => __( 'Large', 'powerpack' ),
566
  'xl' => __( 'Extra Large', 'powerpack' ),
567
- ),
568
- )
569
  );
570
  $this->add_responsive_control(
571
  'button_spacing',
572
- array(
573
- 'label' => __( 'Buttons Spacing', 'powerpack' ),
574
- 'type' => Controls_Manager::SLIDER,
575
- 'default' => array(
576
  'size' => 10,
577
- ),
578
- 'range' => array(
579
- 'px' => array(
580
  'max' => 100,
581
- ),
582
- ),
583
- 'selectors' => array(
584
  '{{WRAPPER}} .pp-buttons-group .pp-button:not(:last-child)' => 'margin-right: {{SIZE}}{{UNIT}};',
585
  '(desktop){{WRAPPER}}.pp-buttons-stack-desktop .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
586
  '(tablet){{WRAPPER}}.pp-buttons-stack-tablet .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
587
  '(mobile){{WRAPPER}}.pp-buttons-stack-mobile .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
588
- ),
589
- )
590
  );
591
 
592
  $this->add_responsive_control(
593
  'vertical_align',
594
- array(
595
- 'label' => __( 'Vertical Alignment', 'powerpack' ),
596
- 'type' => Controls_Manager::CHOOSE,
597
- 'default' => 'middle',
598
- 'options' => array(
599
- 'top' => array(
600
- 'title' => __( 'Top', 'powerpack' ),
601
- 'icon' => 'eicon-v-align-top',
602
- ),
603
- 'middle' => array(
604
- 'title' => __( 'Middle', 'powerpack' ),
605
- 'icon' => 'eicon-v-align-middle',
606
- ),
607
- 'bottom' => array(
608
- 'title' => __( 'Bottom', 'powerpack' ),
609
- 'icon' => 'eicon-v-align-bottom',
610
- ),
611
- 'stretch' => array(
612
- 'title' => __( 'Stretch', 'powerpack' ),
613
- 'icon' => 'eicon-v-align-stretch',
614
- ),
615
- ),
616
- 'prefix_class' => 'pp-buttons-valign%s-',
617
- )
618
  );
619
 
620
  $this->add_responsive_control(
621
  'button_align',
622
- array(
623
- 'label' => __( 'Horizontal Alignment', 'powerpack' ),
624
- 'type' => Controls_Manager::CHOOSE,
625
- 'default' => 'left',
626
- 'options' => array(
627
- 'left' => array(
628
- 'title' => __( 'Left', 'powerpack' ),
629
- 'icon' => 'eicon-h-align-left',
630
- ),
631
- 'center' => array(
632
- 'title' => __( 'Center', 'powerpack' ),
633
- 'icon' => 'eicon-h-align-center',
634
- ),
635
- 'right' => array(
636
- 'title' => __( 'Right', 'powerpack' ),
637
- 'icon' => 'eicon-h-align-right',
638
- ),
639
- 'stretch' => array(
640
- 'title' => __( 'Stretch', 'powerpack' ),
641
- 'icon' => 'eicon-h-align-stretch',
642
- ),
643
- ),
644
- 'prefix_class' => 'pp-buttons-halign%s-',
645
- )
646
  );
647
 
648
  $this->add_responsive_control(
649
  'content_align',
650
- array(
651
- 'label' => __( 'Content Alignment', 'powerpack' ),
652
- 'type' => Controls_Manager::CHOOSE,
653
- 'default' => 'left',
654
- 'options' => array(
655
- 'left' => array(
656
- 'title' => __( 'Left', 'powerpack' ),
657
- 'icon' => 'eicon-h-align-left',
658
- ),
659
- 'center' => array(
660
- 'title' => __( 'Center', 'powerpack' ),
661
- 'icon' => 'eicon-h-align-center',
662
- ),
663
- 'right' => array(
664
- 'title' => __( 'Right', 'powerpack' ),
665
- 'icon' => 'eicon-h-align-right',
666
- ),
667
- 'stretch' => array(
668
- 'title' => __( 'Stretch', 'powerpack' ),
669
- 'icon' => 'eicon-h-align-stretch',
670
- ),
671
- ),
672
- 'selectors_dictionary' => array(
673
- 'left' => 'flex-start',
674
- 'center' => 'center',
675
- 'right' => 'flex-end',
676
- 'stretch' => 'stretch',
677
- ),
678
- 'selectors' => array(
679
  '{{WRAPPER}} .pp-button .pp-button-content-wrapper' => 'justify-content: {{VALUE}};',
680
- ),
681
- 'condition' => array(
682
  'button_align' => 'stretch',
683
- ),
684
- )
685
  );
686
 
687
  $this->add_control(
688
  'stack_on',
689
- array(
690
- 'label' => __( 'Stack on', 'powerpack' ),
691
- 'type' => Controls_Manager::SELECT,
692
- 'default' => 'none',
693
- 'description' => __( 'Choose a breakpoint where the buttons will stack.', 'powerpack' ),
694
- 'options' => array(
695
  'none' => __( 'None', 'powerpack' ),
696
  'desktop' => __( 'Desktop', 'powerpack' ),
697
  'tablet' => __( 'Tablet', 'powerpack' ),
698
  'mobile' => __( 'Mobile', 'powerpack' ),
699
- ),
700
- 'prefix_class' => 'pp-buttons-stack-',
701
- )
702
  );
703
 
704
  $this->add_responsive_control(
705
  'button_padding',
706
- array(
707
- 'label' => __( 'Padding', 'powerpack' ),
708
- 'type' => Controls_Manager::DIMENSIONS,
709
- 'size_units' => array( 'px', 'em', '%' ),
710
- 'selectors' => array(
711
  '{{WRAPPER}} .pp-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
712
- ),
713
- )
714
  );
715
 
716
  $this->end_controls_section();
@@ -721,139 +729,139 @@ class Buttons extends Powerpack_Widget {
721
  */
722
  $this->start_controls_section(
723
  'section_info_box_button_style',
724
- array(
725
- 'label' => __( 'Styling', 'powerpack' ),
726
- 'tab' => Controls_Manager::TAB_STYLE,
727
- )
728
  );
729
  $this->add_group_control(
730
  Group_Control_Typography::get_type(),
731
- array(
732
- 'name' => 'button_typography',
733
- 'label' => __( 'Typography', 'powerpack' ),
734
- 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
735
- 'selector' => '{{WRAPPER}} .pp-button',
736
- )
737
  );
738
  $this->start_controls_tabs( 'tabs_button_style' );
739
 
740
  $this->start_controls_tab(
741
  'tab_button_normal',
742
- array(
743
- 'label' => __( 'Normal', 'powerpack' ),
744
- )
745
  );
746
 
747
  $this->add_control(
748
  'button_bg_color_normal',
749
- array(
750
- 'label' => __( 'Background Color', 'powerpack' ),
751
- 'type' => Controls_Manager::COLOR,
752
- 'scheme' => array(
753
  'type' => Scheme_Color::get_type(),
754
  'value' => Scheme_Color::COLOR_4,
755
- ),
756
- 'default' => '',
757
- 'selectors' => array(
758
  '{{WRAPPER}} .pp-button' => 'background: {{VALUE}};',
759
- ),
760
- )
761
  );
762
  $this->add_control(
763
  'button_text_color_normal',
764
- array(
765
- 'label' => __( 'Text Color', 'powerpack' ),
766
- 'type' => Controls_Manager::COLOR,
767
- 'default' => '#ffffff',
768
- 'selectors' => array(
769
  '{{WRAPPER}} .pp-button' => 'color: {{VALUE}}',
770
- ),
771
- )
772
  );
773
  $this->add_group_control(
774
  Group_Control_Border::get_type(),
775
- array(
776
- 'name' => 'button_border_normal',
777
- 'label' => __( 'Border', 'powerpack' ),
778
- 'placeholder' => '1px',
779
- 'default' => '1px',
780
- 'selector' => '{{WRAPPER}} .pp-button',
781
- )
782
  );
783
  $this->add_responsive_control(
784
  'button_border_radius',
785
- array(
786
- 'label' => __( 'Border Radius', 'powerpack' ),
787
- 'type' => Controls_Manager::DIMENSIONS,
788
- 'size_units' => array( 'px', '%' ),
789
- 'selectors' => array(
790
  '{{WRAPPER}} .pp-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
791
- ),
792
- )
793
  );
794
  $this->add_group_control(
795
  Group_Control_Box_Shadow::get_type(),
796
- array(
797
- 'name' => 'button_box_shadow',
798
- 'selector' => '{{WRAPPER}} .pp-button',
799
- )
800
  );
801
 
802
  $this->end_controls_tab();
803
 
804
  $this->start_controls_tab(
805
  'tab_button_hover',
806
- array(
807
- 'label' => __( 'Hover', 'powerpack' ),
808
- )
809
  );
810
 
811
  $this->add_control(
812
  'button_bg_color_hover',
813
- array(
814
- 'label' => __( 'Background Color', 'powerpack' ),
815
- 'type' => Controls_Manager::COLOR,
816
- 'default' => '',
817
- 'selectors' => array(
818
  '{{WRAPPER}} .pp-button:hover' => 'background: {{VALUE}};',
819
- ),
820
- )
821
  );
822
  $this->add_control(
823
  'button_text_color_hover',
824
- array(
825
- 'label' => __( 'Text Color', 'powerpack' ),
826
- 'type' => Controls_Manager::COLOR,
827
- 'default' => '',
828
- 'selectors' => array(
829
  '{{WRAPPER}} .pp-button:hover' => 'color: {{VALUE}}',
830
- ),
831
- )
832
  );
833
  $this->add_control(
834
  'button_border_color_hover',
835
- array(
836
- 'label' => __( 'Border Color', 'powerpack' ),
837
- 'type' => Controls_Manager::COLOR,
838
- 'default' => '',
839
- 'selectors' => array(
840
  '{{WRAPPER}} .pp-button:hover' => 'border-color: {{VALUE}}',
841
- ),
842
- )
843
  );
844
  $this->add_group_control(
845
  Group_Control_Box_Shadow::get_type(),
846
- array(
847
- 'name' => 'button_box_shadow_hover',
848
- 'selector' => '{{WRAPPER}} .pp-button:hover',
849
- )
850
  );
851
  $this->add_control(
852
  'button_animation',
853
- array(
854
- 'label' => __( 'Animation', 'powerpack' ),
855
- 'type' => Controls_Manager::HOVER_ANIMATION,
856
- )
857
  );
858
 
859
  $this->end_controls_tab();
@@ -867,118 +875,118 @@ class Buttons extends Powerpack_Widget {
867
  */
868
  $this->start_controls_section(
869
  'section_icon_style',
870
- array(
871
- 'label' => __( 'Icon', 'powerpack' ),
872
- 'tab' => Controls_Manager::TAB_STYLE,
873
- )
874
  );
875
 
876
  $this->add_group_control(
877
  Group_Control_Typography::get_type(),
878
- array(
879
- 'name' => 'icon_typography',
880
- 'label' => __( 'Typography', 'powerpack' ),
881
- 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
882
- 'selector' => '{{WRAPPER}} .pp-button-icon-number',
883
- )
884
  );
885
  $this->add_responsive_control(
886
  'icon_position',
887
- array(
888
- 'label' => __( 'Icon Position', 'powerpack' ),
889
- 'type' => Controls_Manager::SELECT,
890
- 'default' => 'before',
891
- 'options' => array(
892
- 'after' => __( 'After', 'powerpack' ),
893
- 'before' => __( 'Before', 'powerpack' ),
894
- 'top' => __( 'Top', 'powerpack' ),
895
- 'bottom' => __( 'Bottom', 'powerpack' ),
896
- ),
897
- )
898
  );
899
  $this->add_responsive_control(
900
  'icon_size',
901
- array(
902
- 'label' => __( 'Size', 'powerpack' ),
903
- 'type' => Controls_Manager::SLIDER,
904
- 'default' => array(
905
  'size' => '',
906
- ),
907
- 'range' => array(
908
- 'px' => array(
909
  'min' => 6,
910
  'max' => 100,
911
- ),
912
- ),
913
- 'selectors' => array(
914
  '{{WRAPPER}} .pp-button-icon' => 'font-size: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
915
  '{{WRAPPER}} .pp-button-icon-image img' => 'width: {{SIZE}}{{UNIT}};',
916
- ),
917
- )
918
  );
919
  $this->add_responsive_control(
920
  'icon_spacing',
921
- array(
922
- 'label' => __( 'Spacing', 'powerpack' ),
923
- 'type' => Controls_Manager::SLIDER,
924
- 'default' => array(
925
  'size' => 8,
926
- ),
927
- 'range' => array(
928
- 'px' => array(
929
  'max' => 50,
930
- ),
931
- ),
932
- 'selectors' => array(
933
  '{{WRAPPER}} .pp-icon-before .pp-buttons-icon-wrapper' => 'margin-right: {{SIZE}}{{UNIT}};',
934
  '{{WRAPPER}} .pp-icon-after .pp-buttons-icon-wrapper' => 'margin-left: {{SIZE}}{{UNIT}};',
935
  '{{WRAPPER}} .pp-icon-top .pp-buttons-icon-wrapper' => 'margin-bottom: {{SIZE}}{{UNIT}};',
936
  '{{WRAPPER}} .pp-icon-bottom .pp-buttons-icon-wrapper' => 'margin-top: {{SIZE}}{{UNIT}};',
937
- ),
938
- )
939
  );
940
 
941
  $this->start_controls_tabs( 'tabs_icon_style' );
942
 
943
  $this->start_controls_tab(
944
  'tab_icon_normal',
945
- array(
946
- 'label' => __( 'Normal', 'powerpack' ),
947
- )
948
  );
949
  $this->add_control(
950
  'icon_color',
951
- array(
952
- 'label' => __( 'Color', 'powerpack' ),
953
- 'type' => Controls_Manager::COLOR,
954
- 'default' => '',
955
- 'selectors' => array(
956
  '{{WRAPPER}} .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
957
  '{{WRAPPER}} .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
958
- ),
959
- )
960
  );
961
 
962
  $this->end_controls_tab();
963
 
964
  $this->start_controls_tab(
965
  'tab_icon_hover',
966
- array(
967
- 'label' => __( 'Hover', 'powerpack' ),
968
- )
969
  );
970
 
971
  $this->add_control(
972
  'icon_color_hover',
973
- array(
974
- 'label' => __( 'Color', 'powerpack' ),
975
- 'type' => Controls_Manager::COLOR,
976
- 'default' => '',
977
- 'selectors' => array(
978
  '{{WRAPPER}} .pp-button:hover .pp-buttons-icon-wrapper .pp-button-icon' => 'color: {{VALUE}};',
979
  '{{WRAPPER}} .pp-button:hover .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
980
- ),
981
- )
982
  );
983
 
984
  $this->end_controls_tab();
@@ -994,115 +1002,115 @@ class Buttons extends Powerpack_Widget {
994
 
995
  $this->start_controls_section(
996
  'section_tooltip_style',
997
- array(
998
- 'label' => __( 'Tooltip', 'powerpack' ),
999
- 'tab' => Controls_Manager::TAB_STYLE,
1000
- )
1001
  );
1002
 
1003
  $this->add_responsive_control(
1004
  'tooltips_position',
1005
- array(
1006
- 'label' => __( 'Tooltip Position', 'powerpack' ),
1007
- 'type' => Controls_Manager::SELECT,
1008
- 'default' => 'above',
1009
- 'options' => array(
1010
- 'above' => __( 'Above', 'powerpack' ),
1011
- 'below' => __( 'Below', 'powerpack' ),
1012
- 'left' => __( 'Left', 'powerpack' ),
1013
- 'right' => __( 'Right', 'powerpack' ),
1014
- ),
1015
- )
1016
  );
1017
  $this->add_control(
1018
  'tooltips_align',
1019
- array(
1020
  'label' => __( 'Text Align', 'powerpack' ),
1021
  'type' => Controls_Manager::CHOOSE,
1022
  'default' => ' center',
1023
- 'options' => array(
1024
- 'left' => array(
1025
- 'title' => __( 'Left', 'powerpack' ),
1026
- 'icon' => 'fa fa-align-left',
1027
- ),
1028
- 'center' => array(
1029
  'title' => __( 'Center', 'powerpack' ),
1030
  'icon' => 'fa fa-align-center',
1031
- ),
1032
- 'right' => array(
1033
  'title' => __( 'Right', 'powerpack' ),
1034
  'icon' => 'fa fa-align-right',
1035
- ),
1036
- ),
1037
- 'selectors' => array(
1038
  '.pp-tooltip-{{ID}}' => 'text-align: {{VALUE}};',
1039
- ),
1040
- )
1041
  );
1042
  $this->add_responsive_control(
1043
  'tooltips_padding',
1044
- array(
1045
- 'label' => __( 'Padding', 'powerpack' ),
1046
- 'type' => Controls_Manager::DIMENSIONS,
1047
- 'size_units' => array( 'px', 'em', '%' ),
1048
- 'selectors' => array(
1049
- '.pp-tooltip-{{ID}}' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1050
- ),
1051
- )
1052
  );
1053
  $this->add_responsive_control(
1054
  'tooltips_border_radius',
1055
- array(
1056
- 'label' => __( 'Border Radius', 'powerpack' ),
1057
- 'type' => Controls_Manager::DIMENSIONS,
1058
- 'size_units' => array( 'px', '%' ),
1059
- 'selectors' => array(
1060
- '.pp-tooltip-{{ID}}' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1061
- ),
1062
- )
1063
  );
1064
  $this->add_group_control(
1065
  Group_Control_Typography::get_type(),
1066
- array(
1067
  'name' => 'tooltips_typography',
1068
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
1069
  'separator' => 'after',
1070
- 'selector' => '.pp-tooltip-{{ID}}',
1071
- )
1072
  );
1073
  $this->add_control(
1074
  'tooltips_background_color',
1075
- array(
1076
  'label' => __( 'Background Color', 'powerpack' ),
1077
  'type' => Controls_Manager::COLOR,
1078
  'default' => '#000000',
1079
- 'selectors' => array(
1080
- '.pp-tooltip-{{ID}}' => 'background-color: {{VALUE}};',
1081
- '.pp-tooltip-{{ID}}.above .tooltip-callout:after' => 'border-top-color: {{VALUE}};',
1082
- '.pp-tooltip-{{ID}}.left .tooltip-callout:after' => 'border-left-color: {{VALUE}};',
1083
- '.pp-tooltip-{{ID}}.right .tooltip-callout:after' => 'border-right-color: {{VALUE}};',
1084
- '.pp-tooltip-{{ID}}.below .tooltip-callout:after' => 'border-bottom-color: {{VALUE}};',
1085
- ),
1086
- )
1087
  );
1088
  $this->add_control(
1089
  'tooltips_color',
1090
- array(
1091
  'label' => __( 'Color', 'powerpack' ),
1092
  'type' => Controls_Manager::COLOR,
1093
  'default' => '#ffffff',
1094
- 'selectors' => array(
1095
- '.pp-tooltip-{{ID}}' => 'color: {{VALUE}};',
1096
- ),
1097
- )
1098
  );
1099
  $this->add_group_control(
1100
  Group_Control_Box_Shadow::get_type(),
1101
- array(
1102
  'name' => 'tooltips_box_shadow',
1103
- 'selector' => '.pp-tooltip-{{ID}}',
1104
  'separator' => '',
1105
- )
1106
  );
1107
 
1108
  $this->end_controls_section();
@@ -1118,11 +1126,11 @@ class Buttons extends Powerpack_Widget {
1118
  protected function render() {
1119
  $settings = $this->get_settings_for_display();
1120
 
1121
- $fallback_defaults = array(
1122
  'fa fa-check',
1123
  'fa fa-times',
1124
  'fa fa-dot-circle-o',
1125
- );
1126
 
1127
  // Button Animation
1128
  $button_animation = '';
@@ -1135,11 +1143,11 @@ class Buttons extends Powerpack_Widget {
1135
  <div class="pp-buttons-group">
1136
  <?php foreach ( $settings['buttons'] as $index => $item ) : ?>
1137
  <?php
1138
- $button_key = $this->get_repeater_setting_key( 'button', 'buttons', $index );
1139
- $content_inner_key = $this->get_repeater_setting_key( 'content', 'buttons', $index );
1140
 
1141
  // Button Size
1142
- $buttonSize = ( $item['single_button_size'] != 'default' ) ? $item['single_button_size'] : $settings['button_size'];
1143
 
1144
  // Link
1145
  if ( ! empty( $item['link']['url'] ) ) {
@@ -1147,28 +1155,24 @@ class Buttons extends Powerpack_Widget {
1147
  }
1148
 
1149
  // Icon Position
1150
- $iconPosition = '';
1151
  if ( $settings['icon_position'] ) {
1152
- $iconPosition = 'pp-icon-' . $settings['icon_position'];
1153
  }
1154
  if ( $settings['icon_position_tablet'] ) {
1155
- $iconPosition .= ' pp-icon-' . $settings['icon_position_tablet'] . '-tablet';
1156
  }
1157
  if ( $settings['icon_position_mobile'] ) {
1158
- $iconPosition .= ' pp-icon-' . $settings['icon_position_mobile'] . '-mobile';
1159
  }
1160
 
1161
- $this->add_render_attribute(
1162
- $button_key,
1163
- 'class',
1164
- array(
1165
- 'pp-button',
1166
- 'elementor-button',
1167
- 'elementor-size-' . $buttonSize,
1168
- 'elementor-repeater-item-' . $item['_id'],
1169
- $button_animation,
1170
- )
1171
- );
1172
 
1173
  // CSS ID
1174
  if ( $item['css_id'] ) {
@@ -1181,8 +1185,8 @@ class Buttons extends Powerpack_Widget {
1181
  }
1182
 
1183
  // ToolTip
1184
- if ( $item['has_tooltip'] == 'yes' && ! empty( $item['tooltip_content'] ) ) {
1185
- $ttip_position = $this->get_tooltip_position( $settings['tooltips_position'] );
1186
  $ttip_position_tablet = $this->get_tooltip_position( $settings['tooltips_position_tablet'] );
1187
  $ttip_position_mobile = $this->get_tooltip_position( $settings['tooltips_position_mobile'] );
1188
 
@@ -1200,59 +1204,50 @@ class Buttons extends Powerpack_Widget {
1200
 
1201
  $this->add_render_attribute(
1202
  $button_key,
1203
- array(
1204
- 'data-tooltip' => htmlspecialchars( $item['tooltip_content'] ),
1205
- 'data-tooltip-position' => $ttip_position,
1206
- 'data-tooltip-position-tablet' => $ttip_tablet,
1207
- 'data-tooltip-position-mobile' => $ttip_mobile,
1208
- )
1209
  );
1210
  }
1211
 
1212
- $this->add_render_attribute(
1213
- $content_inner_key,
1214
- 'class',
1215
- array(
1216
- 'pp-button-content-inner',
1217
- $iconPosition,
1218
- )
1219
- );
1220
  ?>
1221
  <a <?php echo $this->get_render_attribute_string( $button_key ); ?>>
1222
  <div class="pp-button-content-wrapper">
1223
  <span <?php echo $this->get_render_attribute_string( $content_inner_key ); ?>>
1224
  <?php
1225
- if ( $item['pp_icon_type'] != 'none' ) {
1226
- $icon_key = 'icon_' . $i;
1227
  $icon_wrap = 'pp-buttons-icon-wrapper';
1228
  $this->add_render_attribute( $icon_key, 'class', $icon_wrap );
1229
  $migration_allowed = Icons_Manager::is_migration_allowed();
1230
  ?>
1231
  <span <?php echo $this->get_render_attribute_string( $icon_key ); ?>>
1232
  <?php
1233
- if ( $item['pp_icon_type'] == 'icon' ) {
1234
  // add old default
1235
  if ( ! isset( $item['icon'] ) && ! $migration_allowed ) {
1236
  $item['icon'] = isset( $fallback_defaults[ $index ] ) ? $fallback_defaults[ $index ] : 'fa fa-check';
1237
  }
1238
 
1239
  $migrated = isset( $item['__fa4_migrated']['selected_icon'] );
1240
- $is_new = ! isset( $item['icon'] ) && $migration_allowed;
1241
 
1242
- if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) ) {
1243
- ?>
1244
  <span class="pp-button-icon pp-icon">
1245
  <?php
1246
  if ( $is_new || $migrated ) {
1247
- Icons_Manager::render_icon(
1248
- $item['selected_icon'],
1249
- array(
1250
- 'class' => 'pp-button-icon',
1251
- 'aria-hidden' => 'true',
1252
- )
1253
- );
1254
- } else {
1255
- ?>
1256
  <i class="pp-button-icon <?php echo esc_attr( $item['icon'] ); ?>" aria-hidden="true"></i>
1257
  <?php
1258
  }
@@ -1260,22 +1255,20 @@ class Buttons extends Powerpack_Widget {
1260
  </span>
1261
  <?php
1262
  }
1263
- } elseif ( $item['pp_icon_type'] == 'image' ) {
1264
  printf( '<span class="pp-button-icon-image"><img src="%1$s"></span>', esc_url( $item['icon_img']['url'] ) );
1265
- } elseif ( $item['pp_icon_type'] == 'text' ) {
1266
  printf( '<span class="pp-button-icon pp-button-icon-number">%1$s</span>', esc_attr( $item['icon_text'] ) );
1267
  }
1268
  ?>
1269
  </span>
1270
  <?php
1271
  }
1272
- if ( $item['text'] ) {
1273
- ?>
1274
  <?php
1275
  $text_key = $this->get_repeater_setting_key( 'text', 'buttons', $index );
1276
  $this->add_render_attribute( $text_key, 'class', 'pp-button-title' );
1277
- $this->add_inline_editing_attributes( $text_key, 'none' );
1278
- ?>
1279
 
1280
  <span <?php echo $this->get_render_attribute_string( $text_key ); ?>>
1281
  <?php
@@ -1286,27 +1279,34 @@ class Buttons extends Powerpack_Widget {
1286
  </span>
1287
  </div>
1288
  </a>
1289
- <?php
1290
- $i++;
1291
- endforeach;
1292
- ?>
1293
- </div>
1294
- <?php
1295
  }
1296
 
1297
  protected function get_tooltip_position( $pos ) {
1298
  $tt_position = '';
1299
 
1300
- if ( $pos === 'above' ) {
1301
- $tt_position = 'tt-top';
1302
- } elseif ( $pos === 'below' ) {
1303
- $tt_position = 'tt-bottom';
1304
- } elseif ( $pos === 'left' ) {
1305
- $tt_position = 'tt-left';
1306
- } elseif ( $pos === 'right' ) {
1307
- $tt_position = 'tt-right';
1308
- } else {
1309
- $tt_position = 'tt-top';
 
 
 
 
 
 
 
 
 
 
1310
  }
1311
 
1312
  return $tt_position;
@@ -1317,9 +1317,10 @@ endforeach;
1317
  *
1318
  * Written as a Backbone JavaScript template and used to generate the live preview.
1319
  *
 
1320
  * @access protected
1321
  */
1322
- protected function _content_template() {
1323
  ?>
1324
  <div class="pp-buttons-group">
1325
  <# var i = 1; #>
@@ -1413,7 +1414,6 @@ endforeach;
1413
  }
1414
  );
1415
  #>
1416
-
1417
  <a {{{ view.getRenderAttributeString( button_key ) }}}>
1418
  <div class="pp-button-content-wrapper">
1419
  <span {{{ view.getRenderAttributeString( content_inner_key ) }}}>
@@ -1449,7 +1449,7 @@ endforeach;
1449
  <# } #>
1450
  </span>
1451
  <# } #>
1452
-
1453
  <# if ( item.text != '' ) { #>
1454
  <#
1455
  var text_key = 'text_' + i;
@@ -1458,7 +1458,7 @@ endforeach;
1458
 
1459
  view.addInlineEditingAttributes( text_key, 'none' );
1460
  #>
1461
-
1462
  <span {{{ view.getRenderAttributeString( text_key ) }}}>
1463
  {{{ item.text }}}
1464
  </span>
@@ -1470,4 +1470,18 @@ endforeach;
1470
  </div>
1471
  <?php
1472
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1473
  }
79
  * @return array Widget scripts dependencies.
80
  */
81
  public function get_script_depends() {
82
+ return [
83
  'pp-tooltip',
84
  'powerpack-frontend',
85
+ ];
86
+ }
87
+ /**
88
+ * Register buttons widget controls.
89
+ *
90
+ * Adds different input fields to allow the user to change and customize the widget settings.
91
+ *
92
+ * @access protected
93
+ */
94
+ protected function _register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
95
+ $this->register_controls();
96
  }
97
+
98
  /**
99
  * Register buttons widget controls.
100
  *
101
  * Adds different input fields to allow the user to change and customize the widget settings.
102
  *
103
+ * @since 2.1.3
104
  * @access protected
105
  */
106
+ protected function register_controls() {
107
 
108
+ /*-----------------------------------------------------------------------------------*/
109
+ /* CONTENT TAB
 
 
110
  /*-----------------------------------------------------------------------------------*/
111
 
112
  /**
114
  */
115
  $this->start_controls_section(
116
  'section_list',
117
+ [
118
+ 'label' => __( 'Buttons', 'powerpack' ),
119
+ ]
120
  );
121
  $repeater = new Repeater();
122
 
124
 
125
  $repeater->start_controls_tab(
126
  'button_general',
127
+ [
128
  'label' => __( 'Content', 'powerpack' ),
129
+ ]
130
  );
131
 
132
  $repeater->add_control(
133
  'text',
134
+ [
135
+ 'label' => __( 'Text', 'powerpack' ),
136
+ 'type' => Controls_Manager::TEXT,
137
+ 'default' => __( 'Button #1', 'powerpack' ),
138
+ 'placeholder' => __( 'Button #1', 'powerpack' ),
139
+ 'dynamic' => [
140
  'active' => true,
141
+ ],
142
+ ]
143
  );
144
  $repeater->add_control(
145
  'pp_icon_type',
146
+ [
147
+ 'label' => __( 'Icon Type', 'powerpack' ),
148
+ 'type' => Controls_Manager::CHOOSE,
149
+ 'label_block' => false,
150
+ 'toggle' => false,
151
+ 'default' => 'icon',
152
+ 'options' => [
153
+ 'none' => [
154
  'title' => esc_html__( 'None', 'powerpack' ),
155
  'icon' => 'fa fa-ban',
156
+ ],
157
+ 'icon' => [
158
  'title' => esc_html__( 'Icon', 'powerpack' ),
159
  'icon' => 'fa fa-star',
160
+ ],
161
+ 'image' => [
162
  'title' => esc_html__( 'Image', 'powerpack' ),
163
  'icon' => 'fa fa-picture-o',
164
+ ],
165
+ 'text' => [
166
  'title' => esc_html__( 'Text', 'powerpack' ),
167
  'icon' => 'fa fa-hashtag',
168
+ ],
169
+ ],
170
+ ]
171
  );
172
  $repeater->add_control(
173
  'selected_icon',
174
+ [
175
+ 'label' => __( 'Icon', 'powerpack' ),
176
+ 'type' => Controls_Manager::ICONS,
177
+ 'label_block' => true,
178
+ 'default' => [
179
+ 'value' => 'fas fa-check',
180
  'library' => 'fa-solid',
181
+ ],
182
+ 'fa4compatibility' => 'button_icon',
183
+ 'condition' => [
184
  'pp_icon_type' => 'icon',
185
+ ],
186
+ ]
187
  );
188
  $repeater->add_control(
189
  'icon_img',
190
+ [
191
+ 'label' => __( 'Image', 'powerpack' ),
192
+ 'label_block' => true,
193
+ 'type' => Controls_Manager::MEDIA,
194
+ 'default' => [
195
  'url' => Utils::get_placeholder_image_src(),
196
+ ],
197
+ 'dynamic' => [
198
+ 'active' => true,
199
+ ],
200
+ 'condition' => [
201
  'pp_icon_type' => 'image',
202
+ ],
203
+ ]
204
  );
205
  $repeater->add_control(
206
  'icon_text',
207
+ [
208
+ 'label' => __( 'Icon Text', 'powerpack' ),
209
+ 'label_block' => false,
210
+ 'type' => Controls_Manager::TEXT,
211
+ 'default' => __( '1', 'powerpack' ),
212
+ 'dynamic' => [
213
+ 'active' => true,
214
+ ],
215
+ 'condition' => [
216
  'pp_icon_type' => 'text',
217
+ ],
218
+ ]
219
  );
220
 
221
  $repeater->add_control(
222
  'has_tooltip',
223
+ [
224
+ 'label' => __( 'Enable Tooltip', 'powerpack' ),
225
+ 'type' => Controls_Manager::SWITCHER,
226
+ 'default' => 'no',
227
+ 'yes' => __( 'Yes', 'powerpack' ),
228
+ 'no' => __( 'No', 'powerpack' ),
229
+ ]
230
  );
231
 
232
  $repeater->add_control(
233
  'tooltip_content',
234
+ [
235
+ 'label' => __( 'Tooltip Content', 'powerpack' ),
236
+ 'type' => Controls_Manager::TEXTAREA,
237
+ 'default' => __( 'I am a tooltip for a button', 'powerpack' ),
238
+ 'placeholder' => __( 'I am a tooltip for a button', 'powerpack' ),
239
+ 'rows' => 5,
240
+ 'condition' => [
241
+ 'has_tooltip' => 'yes',
242
+ ],
243
+ ]
244
  );
245
 
246
  $repeater->add_control(
247
  'link',
248
+ [
249
+ 'label' => __( 'Link', 'powerpack' ),
250
+ 'type' => Controls_Manager::URL,
251
+ 'dynamic' => [
252
+ 'active' => true,
253
+ ],
254
+ 'label_block' => true,
255
+ 'placeholder' => __( 'http://your-link.com', 'powerpack' ),
256
+ ]
257
  );
258
  $repeater->add_control(
259
  'css_id',
260
+ [
261
  'label' => __( 'CSS ID', 'powerpack' ),
262
  'title' => __( 'Add your custom ID WITHOUT the # key. e.g: my-id', 'powerpack' ),
263
  'label_block' => false,
264
  'type' => Controls_Manager::TEXT,
265
+ 'dynamic' => [
266
+ 'active' => true,
267
+ ],
268
+ ]
269
  );
270
  $repeater->add_control(
271
  'css_classes',
272
+ [
273
  'label' => __( 'CSS Classes', 'powerpack' ),
274
  'title' => __( 'Add your custom class WITHOUT the dot. e.g: my-class', 'powerpack' ),
275
  'label_block' => false,
276
  'type' => Controls_Manager::TEXT,
277
+ 'dynamic' => [
278
+ 'active' => true,
279
+ ],
280
+ ]
281
  );
282
 
283
  $repeater->end_controls_tab();
284
 
285
  $repeater->start_controls_tab(
286
  'button_layout_tab',
287
+ [
288
  'label' => __( 'Layout', 'powerpack' ),
289
+ ]
290
  );
291
 
292
  $repeater->add_control(
293
  'single_button_size',
294
+ [
295
+ 'label' => __( 'Button Size', 'powerpack' ),
296
+ 'type' => Controls_Manager::SELECT,
297
+ 'default' => 'default',
298
+ 'options' => [
299
  'default' => __( 'Default', 'powerpack' ),
300
+ 'xs' => __( 'Extra Small', 'powerpack' ),
301
+ 'sm' => __( 'Small', 'powerpack' ),
302
+ 'md' => __( 'Medium', 'powerpack' ),
303
+ 'lg' => __( 'Large', 'powerpack' ),
304
+ 'xl' => __( 'Extra Large', 'powerpack' ),
305
+ 'custom' => __( 'Custom', 'powerpack' ),
306
+ ],
307
+ ]
308
  );
309
 
310
  $repeater->add_responsive_control(
311
  'single_button_width',
312
+ [
313
+ 'label' => __( 'Button Width', 'powerpack' ),
314
+ 'type' => Controls_Manager::SLIDER,
315
+ 'size_units' => [ 'px', '%' ],
316
+ 'range' => [
317
+ 'px' => [
318
+ 'min' => 10,
319
+ 'max' => 800,
320
+ 'step' => 1,
321
+ ],
322
+ ],
323
+ 'selectors' => [
324
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'width: {{SIZE}}{{UNIT}};',
325
+ ],
326
+ 'condition' => [
327
  'single_button_size' => 'custom',
328
+ ],
329
+ ]
330
  );
331
 
332
  $repeater->add_responsive_control(
333
  'single_button_padding',
334
+ [
335
+ 'label' => __( 'Padding', 'powerpack' ),
336
+ 'type' => Controls_Manager::DIMENSIONS,
337
+ 'size_units' => [ 'px', 'em', '%' ],
338
+ 'selectors' => [
339
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
340
+ ],
341
+ ]
342
  );
343
 
344
  $repeater->end_controls_tab();
345
 
346
  $repeater->start_controls_tab(
347
  'button_style_tabs',
348
+ [
349
  'label' => __( 'Style', 'powerpack' ),
350
+ ]
351
  );
352
 
353
  $repeater->add_group_control(
354
  Group_Control_Typography::get_type(),
355
+ [
356
+ 'name' => 'single_title_typography',
357
+ 'label' => __( 'Button Typography', 'powerpack' ),
358
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
359
+ 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-button-title',
360
+ ]
361
  );
362
 
363
  $repeater->add_responsive_control(
364
  'single_icon_size',
365
+ [
366
+ 'label' => __( 'Icon Size', 'powerpack' ),
367
+ 'type' => Controls_Manager::SLIDER,
368
+ 'range' => [
369
+ 'px' => [
370
+ 'min' => 5,
371
+ 'max' => 100,
372
+ 'step' => 1,
373
+ ],
374
+ ],
375
+ 'selectors' => [
376
  '{{WRAPPER}} {{CURRENT_ITEM}} span.pp-button-icon' => 'font-size: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
377
  '{{WRAPPER}} {{CURRENT_ITEM}} .pp-button-icon-image img' => 'width: {{SIZE}}{{UNIT}};',
378
+ ],
379
+ 'condition' => [
380
  'pp_icon_type!' => 'none',
381
+ ],
382
+ ]
383
  );
384
 
385
  $repeater->add_control(
386
  'single_normal_options',
387
+ [
388
  'label' => __( 'Normal', 'powerpack' ),
389
  'type' => Controls_Manager::HEADING,
390
  'separator' => 'after',
391
+ ]
392
  );
393
  $repeater->add_control(
394
  'single_button_bg_color',
395
+ [
396
+ 'label' => __( 'Background Color', 'powerpack' ),
397
+ 'type' => Controls_Manager::COLOR,
398
+ 'default' => '',
399
+ 'selectors' => [
400
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'background: {{VALUE}};',
401
+ ],
402
+ ]
403
  );
404
  $repeater->add_control(
405
  'single_text_color',
406
+ [
407
+ 'label' => __( 'Text Color', 'powerpack' ),
408
+ 'type' => Controls_Manager::COLOR,
409
+ 'default' => '',
410
+ 'selectors' => [
411
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'color: {{VALUE}};',
412
+ ],
413
+ ]
414
  );
415
  $repeater->add_control(
416
  'single_icon_color',
417
+ [
418
+ 'label' => __( 'Icon Color', 'powerpack' ),
419
+ 'type' => Controls_Manager::COLOR,
420
+ 'default' => '',
421
+ 'selectors' => [
422
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
423
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
424
+ ],
425
+ ]
426
  );
427
  $repeater->add_group_control(
428
  Group_Control_Border::get_type(),
429
+ [
430
+ 'name' => 'single_button_border',
431
+ 'label' => __( 'Border', 'powerpack' ),
432
+ 'placeholder' => '1px',
433
+ 'default' => '1px',
434
+ 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button',
435
+ ]
436
  );
437
  $repeater->add_control(
438
  'single_button_border_radius',
439
+ [
440
+ 'label' => __( 'Border Radius', 'powerpack' ),
441
+ 'type' => Controls_Manager::DIMENSIONS,
442
+ 'size_units' => [ 'px', '%' ],
443
+ 'selectors' => [
444
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
445
+ ],
446
+ ]
447
  );
448
 
449
  $repeater->add_control(
450
  'single_hover_options',
451
+ [
452
+ 'label' => __( 'Hover', 'powerpack' ),
453
+ 'type' => Controls_Manager::HEADING,
454
  'separator' => 'after',
455
+ ]
456
  );
457
 
458
  $repeater->add_control(
459
  'single_button_bg_color_hover',
460
+ [
461
+ 'label' => __( 'Background Color', 'powerpack' ),
462
+ 'type' => Controls_Manager::COLOR,
463
+ 'default' => '',
464
+ 'selectors' => [
465
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'background: {{VALUE}};',
466
+ ],
467
+ ]
468
  );
469
 
470
  $repeater->add_control(
471
  'single_text_color_hover',
472
+ [
473
+ 'label' => __( 'Text Color', 'powerpack' ),
474
+ 'type' => Controls_Manager::COLOR,
475
+ 'default' => '',
476
+ 'selectors' => [
477
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'color: {{VALUE}};',
478
+ ],
479
+ ]
480
  );
481
 
482
  $repeater->add_control(
483
  'single_icon_color_hover',
484
+ [
485
+ 'label' => __( 'Icon Color', 'powerpack' ),
486
+ 'type' => Controls_Manager::COLOR,
487
+ 'default' => '',
488
+ 'selectors' => [
489
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
490
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
491
+ ],
492
+ ]
493
  );
494
 
495
  $repeater->add_control(
496
  'single_border_color_hover',
497
+ [
498
+ 'label' => __( 'Border Color', 'powerpack' ),
499
+ 'type' => Controls_Manager::COLOR,
500
+ 'default' => '',
501
+ 'selectors' => [
502
  '{{WRAPPER}} {{CURRENT_ITEM}}.pp-button:hover' => 'border-color: {{VALUE}};',
503
+ ],
504
+ ]
505
  );
506
 
507
  $repeater->end_controls_tab();
510
 
511
  $this->add_control(
512
  'buttons',
513
+ [
514
  'label' => __( 'Buttons', 'powerpack' ),
515
  'type' => Controls_Manager::REPEATER,
516
  'show_label' => true,
517
  'fields' => $repeater->get_controls(),
518
  'title_field' => '{{{ text }}}',
519
+ 'default' => [
520
+ [
521
  'text' => __( 'Button #1', 'powerpack' ),
522
+ ],
523
+ [
524
  'text' => __( 'Button #2', 'powerpack' ),
525
+ ],
526
+ ],
527
+ ]
528
  );
529
  $this->end_controls_section();
530
 
 
 
531
  if ( ! is_pp_elements_active() ) {
532
  $this->start_controls_section(
533
  'section_upgrade_powerpack',
555
  */
556
  $this->start_controls_section(
557
  'button_layout',
558
+ [
559
  'label' => __( 'Layout', 'powerpack' ),
560
  'tab' => Controls_Manager::TAB_STYLE,
561
+ ]
562
  );
563
  $this->add_control(
564
  'button_size',
565
+ [
566
+ 'label' => __( 'Buttons Size', 'powerpack' ),
567
+ 'type' => Controls_Manager::SELECT,
568
+ 'default' => 'sm',
569
+ 'options' => [
570
  'xs' => __( 'Extra Small', 'powerpack' ),
571
  'sm' => __( 'Small', 'powerpack' ),
572
  'md' => __( 'Medium', 'powerpack' ),
573
  'lg' => __( 'Large', 'powerpack' ),
574
  'xl' => __( 'Extra Large', 'powerpack' ),
575
+ ],
576
+ ]
577
  );
578
  $this->add_responsive_control(
579
  'button_spacing',
580
+ [
581
+ 'label' => __( 'Buttons Spacing', 'powerpack' ),
582
+ 'type' => Controls_Manager::SLIDER,
583
+ 'default' => [
584
  'size' => 10,
585
+ ],
586
+ 'range' => [
587
+ 'px' => [
588
  'max' => 100,
589
+ ],
590
+ ],
591
+ 'selectors' => [
592
  '{{WRAPPER}} .pp-buttons-group .pp-button:not(:last-child)' => 'margin-right: {{SIZE}}{{UNIT}};',
593
  '(desktop){{WRAPPER}}.pp-buttons-stack-desktop .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
594
  '(tablet){{WRAPPER}}.pp-buttons-stack-tablet .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
595
  '(mobile){{WRAPPER}}.pp-buttons-stack-mobile .pp-buttons-group .pp-button:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};',
596
+ ],
597
+ ]
598
  );
599
 
600
  $this->add_responsive_control(
601
  'vertical_align',
602
+ [
603
+ 'label' => __( 'Vertical Alignment', 'powerpack' ),
604
+ 'type' => Controls_Manager::CHOOSE,
605
+ 'default' => 'middle',
606
+ 'options' => [
607
+ 'top' => [
608
+ 'title' => __( 'Top', 'powerpack' ),
609
+ 'icon' => 'eicon-v-align-top',
610
+ ],
611
+ 'middle' => [
612
+ 'title' => __( 'Middle', 'powerpack' ),
613
+ 'icon' => 'eicon-v-align-middle',
614
+ ],
615
+ 'bottom' => [
616
+ 'title' => __( 'Bottom', 'powerpack' ),
617
+ 'icon' => 'eicon-v-align-bottom',
618
+ ],
619
+ 'stretch' => [
620
+ 'title' => __( 'Stretch', 'powerpack' ),
621
+ 'icon' => 'eicon-v-align-stretch',
622
+ ],
623
+ ],
624
+ 'prefix_class' => 'pp-buttons-valign%s-',
625
+ ]
626
  );
627
 
628
  $this->add_responsive_control(
629
  'button_align',
630
+ [
631
+ 'label' => __( 'Horizontal Alignment', 'powerpack' ),
632
+ 'type' => Controls_Manager::CHOOSE,
633
+ 'default' => 'left',
634
+ 'options' => [
635
+ 'left' => [
636
+ 'title' => __( 'Left', 'powerpack' ),
637
+ 'icon' => 'eicon-h-align-left',
638
+ ],
639
+ 'center' => [
640
+ 'title' => __( 'Center', 'powerpack' ),
641
+ 'icon' => 'eicon-h-align-center',
642
+ ],
643
+ 'right' => [
644
+ 'title' => __( 'Right', 'powerpack' ),
645
+ 'icon' => 'eicon-h-align-right',
646
+ ],
647
+ 'stretch' => [
648
+ 'title' => __( 'Stretch', 'powerpack' ),
649
+ 'icon' => 'eicon-h-align-stretch',
650
+ ],
651
+ ],
652
+ 'prefix_class' => 'pp-buttons-halign%s-',
653
+ ]
654
  );
655
 
656
  $this->add_responsive_control(
657
  'content_align',
658
+ [
659
+ 'label' => __( 'Content Alignment', 'powerpack' ),
660
+ 'type' => Controls_Manager::CHOOSE,
661
+ 'default' => 'left',
662
+ 'options' => [
663
+ 'left' => [
664
+ 'title' => __( 'Left', 'powerpack' ),
665
+ 'icon' => 'eicon-h-align-left',
666
+ ],
667
+ 'center' => [
668
+ 'title' => __( 'Center', 'powerpack' ),
669
+ 'icon' => 'eicon-h-align-center',
670
+ ],
671
+ 'right' => [
672
+ 'title' => __( 'Right', 'powerpack' ),
673
+ 'icon' => 'eicon-h-align-right',
674
+ ],
675
+ 'stretch' => [
676
+ 'title' => __( 'Stretch', 'powerpack' ),
677
+ 'icon' => 'eicon-h-align-stretch',
678
+ ],
679
+ ],
680
+ 'selectors_dictionary' => [
681
+ 'left' => 'flex-start',
682
+ 'center' => 'center',
683
+ 'right' => 'flex-end',
684
+ 'stretch' => 'stretch',
685
+ ],
686
+ 'selectors' => [
687
  '{{WRAPPER}} .pp-button .pp-button-content-wrapper' => 'justify-content: {{VALUE}};',
688
+ ],
689
+ 'condition' => [
690
  'button_align' => 'stretch',
691
+ ],
692
+ ]
693
  );
694
 
695
  $this->add_control(
696
  'stack_on',
697
+ [
698
+ 'label' => __( 'Stack on', 'powerpack' ),
699
+ 'type' => Controls_Manager::SELECT,
700
+ 'default' => 'none',
701
+ 'description' => __( 'Choose a breakpoint where the buttons will stack.', 'powerpack' ),
702
+ 'options' => [
703
  'none' => __( 'None', 'powerpack' ),
704
  'desktop' => __( 'Desktop', 'powerpack' ),
705
  'tablet' => __( 'Tablet', 'powerpack' ),
706
  'mobile' => __( 'Mobile', 'powerpack' ),
707
+ ],
708
+ 'prefix_class' => 'pp-buttons-stack-',
709
+ ]
710
  );
711
 
712
  $this->add_responsive_control(
713
  'button_padding',
714
+ [
715
+ 'label' => __( 'Padding', 'powerpack' ),
716
+ 'type' => Controls_Manager::DIMENSIONS,
717
+ 'size_units' => [ 'px', 'em', '%' ],
718
+ 'selectors' => [
719
  '{{WRAPPER}} .pp-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
720
+ ],
721
+ ]
722
  );
723
 
724
  $this->end_controls_section();
729
  */
730
  $this->start_controls_section(
731
  'section_info_box_button_style',
732
+ [
733
+ 'label' => __( 'Styling', 'powerpack' ),
734
+ 'tab' => Controls_Manager::TAB_STYLE,
735
+ ]
736
  );
737
  $this->add_group_control(
738
  Group_Control_Typography::get_type(),
739
+ [
740
+ 'name' => 'button_typography',
741
+ 'label' => __( 'Typography', 'powerpack' ),
742
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
743
+ 'selector' => '{{WRAPPER}} .pp-button',
744
+ ]
745
  );
746
  $this->start_controls_tabs( 'tabs_button_style' );
747
 
748
  $this->start_controls_tab(
749
  'tab_button_normal',
750
+ [
751
+ 'label' => __( 'Normal', 'powerpack' ),
752
+ ]
753
  );
754
 
755
  $this->add_control(
756
  'button_bg_color_normal',
757
+ [
758
+ 'label' => __( 'Background Color', 'powerpack' ),
759
+ 'type' => Controls_Manager::COLOR,
760
+ 'scheme' => [
761
  'type' => Scheme_Color::get_type(),
762
  'value' => Scheme_Color::COLOR_4,
763
+ ],
764
+ 'default' => '',
765
+ 'selectors' => [
766
  '{{WRAPPER}} .pp-button' => 'background: {{VALUE}};',
767
+ ],
768
+ ]
769
  );
770
  $this->add_control(
771
  'button_text_color_normal',
772
+ [
773
+ 'label' => __( 'Text Color', 'powerpack' ),
774
+ 'type' => Controls_Manager::COLOR,
775
+ 'default' => '#ffffff',
776
+ 'selectors' => [
777
  '{{WRAPPER}} .pp-button' => 'color: {{VALUE}}',
778
+ ],
779
+ ]
780
  );
781
  $this->add_group_control(
782
  Group_Control_Border::get_type(),
783
+ [
784
+ 'name' => 'button_border_normal',
785
+ 'label' => __( 'Border', 'powerpack' ),
786
+ 'placeholder' => '1px',
787
+ 'default' => '1px',
788
+ 'selector' => '{{WRAPPER}} .pp-button',
789
+ ]
790
  );
791
  $this->add_responsive_control(
792
  'button_border_radius',
793
+ [
794
+ 'label' => __( 'Border Radius', 'powerpack' ),
795
+ 'type' => Controls_Manager::DIMENSIONS,
796
+ 'size_units' => [ 'px', '%' ],
797
+ 'selectors' => [
798
  '{{WRAPPER}} .pp-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
799
+ ],
800
+ ]
801
  );
802
  $this->add_group_control(
803
  Group_Control_Box_Shadow::get_type(),
804
+ [
805
+ 'name' => 'button_box_shadow',
806
+ 'selector' => '{{WRAPPER}} .pp-button',
807
+ ]
808
  );
809
 
810
  $this->end_controls_tab();
811
 
812
  $this->start_controls_tab(
813
  'tab_button_hover',
814
+ [
815
+ 'label' => __( 'Hover', 'powerpack' ),
816
+ ]
817
  );
818
 
819
  $this->add_control(
820
  'button_bg_color_hover',
821
+ [
822
+ 'label' => __( 'Background Color', 'powerpack' ),
823
+ 'type' => Controls_Manager::COLOR,
824
+ 'default' => '',
825
+ 'selectors' => [
826
  '{{WRAPPER}} .pp-button:hover' => 'background: {{VALUE}};',
827
+ ],
828
+ ]
829
  );
830
  $this->add_control(
831
  'button_text_color_hover',
832
+ [
833
+ 'label' => __( 'Text Color', 'powerpack' ),
834
+ 'type' => Controls_Manager::COLOR,
835
+ 'default' => '',
836
+ 'selectors' => [
837
  '{{WRAPPER}} .pp-button:hover' => 'color: {{VALUE}}',
838
+ ],
839
+ ]
840
  );
841
  $this->add_control(
842
  'button_border_color_hover',
843
+ [
844
+ 'label' => __( 'Border Color', 'powerpack' ),
845
+ 'type' => Controls_Manager::COLOR,
846
+ 'default' => '',
847
+ 'selectors' => [
848
  '{{WRAPPER}} .pp-button:hover' => 'border-color: {{VALUE}}',
849
+ ],
850
+ ]
851
  );
852
  $this->add_group_control(
853
  Group_Control_Box_Shadow::get_type(),
854
+ [
855
+ 'name' => 'button_box_shadow_hover',
856
+ 'selector' => '{{WRAPPER}} .pp-button:hover',
857
+ ]
858
  );
859
  $this->add_control(
860
  'button_animation',
861
+ [
862
+ 'label' => __( 'Animation', 'powerpack' ),
863
+ 'type' => Controls_Manager::HOVER_ANIMATION,
864
+ ]
865
  );
866
 
867
  $this->end_controls_tab();
875
  */
876
  $this->start_controls_section(
877
  'section_icon_style',
878
+ [
879
+ 'label' => __( 'Icon', 'powerpack' ),
880
+ 'tab' => Controls_Manager::TAB_STYLE,
881
+ ]
882
  );
883
 
884
  $this->add_group_control(
885
  Group_Control_Typography::get_type(),
886
+ [
887
+ 'name' => 'icon_typography',
888
+ 'label' => __( 'Typography', 'powerpack' ),
889
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
890
+ 'selector' => '{{WRAPPER}} .pp-button-icon-number',
891
+ ]
892
  );
893
  $this->add_responsive_control(
894
  'icon_position',
895
+ [
896
+ 'label' => __( 'Icon Position', 'powerpack' ),
897
+ 'type' => Controls_Manager::SELECT,
898
+ 'default' => 'before',
899
+ 'options' => [
900
+ 'after' => __( 'After', 'powerpack' ),
901
+ 'before' => __( 'Before', 'powerpack' ),
902
+ 'top' => __( 'Top', 'powerpack' ),
903
+ 'bottom' => __( 'Bottom', 'powerpack' ),
904
+ ],
905
+ ]
906
  );
907
  $this->add_responsive_control(
908
  'icon_size',
909
+ [
910
+ 'label' => __( 'Size', 'powerpack' ),
911
+ 'type' => Controls_Manager::SLIDER,
912
+ 'default' => [
913
  'size' => '',
914
+ ],
915
+ 'range' => [
916
+ 'px' => [
917
  'min' => 6,
918
  'max' => 100,
919
+ ],
920
+ ],
921
+ 'selectors' => [
922
  '{{WRAPPER}} .pp-button-icon' => 'font-size: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};',
923
  '{{WRAPPER}} .pp-button-icon-image img' => 'width: {{SIZE}}{{UNIT}};',
924
+ ],
925
+ ]
926
  );
927
  $this->add_responsive_control(
928
  'icon_spacing',
929
+ [
930
+ 'label' => __( 'Spacing', 'powerpack' ),
931
+ 'type' => Controls_Manager::SLIDER,
932
+ 'default' => [
933
  'size' => 8,
934
+ ],
935
+ 'range' => [
936
+ 'px' => [
937
  'max' => 50,
938
+ ],
939
+ ],
940
+ 'selectors' => [
941
  '{{WRAPPER}} .pp-icon-before .pp-buttons-icon-wrapper' => 'margin-right: {{SIZE}}{{UNIT}};',
942
  '{{WRAPPER}} .pp-icon-after .pp-buttons-icon-wrapper' => 'margin-left: {{SIZE}}{{UNIT}};',
943
  '{{WRAPPER}} .pp-icon-top .pp-buttons-icon-wrapper' => 'margin-bottom: {{SIZE}}{{UNIT}};',
944
  '{{WRAPPER}} .pp-icon-bottom .pp-buttons-icon-wrapper' => 'margin-top: {{SIZE}}{{UNIT}};',
945
+ ],
946
+ ]
947
  );
948
 
949
  $this->start_controls_tabs( 'tabs_icon_style' );
950
 
951
  $this->start_controls_tab(
952
  'tab_icon_normal',
953
+ [
954
+ 'label' => __( 'Normal', 'powerpack' ),
955
+ ]
956
  );
957
  $this->add_control(
958
  'icon_color',
959
+ [
960
+ 'label' => __( 'Color', 'powerpack' ),
961
+ 'type' => Controls_Manager::COLOR,
962
+ 'default' => '',
963
+ 'selectors' => [
964
  '{{WRAPPER}} .pp-buttons-icon-wrapper span' => 'color: {{VALUE}};',
965
  '{{WRAPPER}} .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
966
+ ],
967
+ ]
968
  );
969
 
970
  $this->end_controls_tab();
971
 
972
  $this->start_controls_tab(
973
  'tab_icon_hover',
974
+ [
975
+ 'label' => __( 'Hover', 'powerpack' ),
976
+ ]
977
  );
978
 
979
  $this->add_control(
980
  'icon_color_hover',
981
+ [
982
+ 'label' => __( 'Color', 'powerpack' ),
983
+ 'type' => Controls_Manager::COLOR,
984
+ 'default' => '',
985
+ 'selectors' => [
986
  '{{WRAPPER}} .pp-button:hover .pp-buttons-icon-wrapper .pp-button-icon' => 'color: {{VALUE}};',
987
  '{{WRAPPER}} .pp-button:hover .pp-buttons-icon-wrapper .pp-icon svg' => 'fill: {{VALUE}};',
988
+ ],
989
+ ]
990
  );
991
 
992
  $this->end_controls_tab();
1002
 
1003
  $this->start_controls_section(
1004
  'section_tooltip_style',
1005
+ [
1006
+ 'label' => __( 'Tooltip', 'powerpack' ),
1007
+ 'tab' => Controls_Manager::TAB_STYLE,
1008
+ ]
1009
  );
1010
 
1011
  $this->add_responsive_control(
1012
  'tooltips_position',
1013
+ [
1014
+ 'label' => __( 'Tooltip Position', 'powerpack' ),
1015
+ 'type' => Controls_Manager::SELECT,
1016
+ 'default' => 'above',
1017
+ 'options' => [
1018
+ 'above' => __( 'Above', 'powerpack' ),
1019
+ 'below' => __( 'Below', 'powerpack' ),
1020
+ 'left' => __( 'Left', 'powerpack' ),
1021
+ 'right' => __( 'Right', 'powerpack' ),
1022
+ ],
1023
+ ]
1024
  );
1025
  $this->add_control(
1026
  'tooltips_align',
1027
+ [
1028
  'label' => __( 'Text Align', 'powerpack' ),
1029
  'type' => Controls_Manager::CHOOSE,
1030
  'default' => ' center',
1031
+ 'options' => [
1032
+ 'left' => [
1033
+ 'title' => __( 'Left', 'powerpack' ),
1034
+ 'icon' => 'fa fa-align-left',
1035
+ ],
1036
+ 'center' => [
1037
  'title' => __( 'Center', 'powerpack' ),
1038
  'icon' => 'fa fa-align-center',
1039
+ ],
1040
+ 'right' => [
1041
  'title' => __( 'Right', 'powerpack' ),
1042
  'icon' => 'fa fa-align-right',
1043
+ ],
1044
+ ],
1045
+ 'selectors' => [
1046
  '.pp-tooltip-{{ID}}' => 'text-align: {{VALUE}};',
1047
+ ],
1048
+ ]
1049
  );
1050
  $this->add_responsive_control(
1051
  'tooltips_padding',
1052
+ [
1053
+ 'label' => __( 'Padding', 'powerpack' ),
1054
+ 'type' => Controls_Manager::DIMENSIONS,
1055
+ 'size_units' => [ 'px', 'em', '%' ],
1056
+ 'selectors' => [
1057
+ '.pp-tooltip-{{ID}} .pp-tooltip-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1058
+ ],
1059
+ ]
1060
  );
1061
  $this->add_responsive_control(
1062
  'tooltips_border_radius',
1063
+ [
1064
+ 'label' => __( 'Border Radius', 'powerpack' ),
1065
+ 'type' => Controls_Manager::DIMENSIONS,
1066
+ 'size_units' => [ 'px', '%' ],
1067
+ 'selectors' => [
1068
+ '.pp-tooltip-{{ID}} .pp-tooltip-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1069
+ ],
1070
+ ]
1071
  );
1072
  $this->add_group_control(
1073
  Group_Control_Typography::get_type(),
1074
+ [
1075
  'name' => 'tooltips_typography',
1076
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
1077
  'separator' => 'after',
1078
+ 'selector' => '.pp-tooltip-{{ID}} .pp-tooltip-content',
1079
+ ]
1080
  );
1081
  $this->add_control(
1082
  'tooltips_background_color',
1083
+ [
1084
  'label' => __( 'Background Color', 'powerpack' ),
1085
  'type' => Controls_Manager::COLOR,
1086
  'default' => '#000000',
1087
+ 'selectors' => [
1088
+ '.pp-tooltip-{{ID}} .pp-tooltip-content' => 'background-color: {{VALUE}};',
1089
+ '.pp-tooltip-{{ID}}.tt-above .pp-tooltip-callout:after' => 'border-top-color: {{VALUE}};',
1090
+ '.pp-tooltip-{{ID}}.tt-left .pp-tooltip-callout:after' => 'border-left-color: {{VALUE}};',
1091
+ '.pp-tooltip-{{ID}}.tt-right .pp-tooltip-callout:after' => 'border-right-color: {{VALUE}};',
1092
+ '.pp-tooltip-{{ID}}.tt-bottom .pp-tooltip-callout:after' => 'border-bottom-color: {{VALUE}};',
1093
+ ],
1094
+ ]
1095
  );
1096
  $this->add_control(
1097
  'tooltips_color',
1098
+ [
1099
  'label' => __( 'Color', 'powerpack' ),
1100
  'type' => Controls_Manager::COLOR,
1101
  'default' => '#ffffff',
1102
+ 'selectors' => [
1103
+ '.pp-tooltip-{{ID}} .pp-tooltip-content' => 'color: {{VALUE}};',
1104
+ ],
1105
+ ]
1106
  );
1107
  $this->add_group_control(
1108
  Group_Control_Box_Shadow::get_type(),
1109
+ [
1110
  'name' => 'tooltips_box_shadow',
1111
+ 'selector' => '.pp-tooltip-{{ID}}',
1112
  'separator' => '',
1113
+ ]
1114
  );
1115
 
1116
  $this->end_controls_section();
1126
  protected function render() {
1127
  $settings = $this->get_settings_for_display();
1128
 
1129
+ $fallback_defaults = [
1130
  'fa fa-check',
1131
  'fa fa-times',
1132
  'fa fa-dot-circle-o',
1133
+ ];
1134
 
1135
  // Button Animation
1136
  $button_animation = '';
1143
  <div class="pp-buttons-group">
1144
  <?php foreach ( $settings['buttons'] as $index => $item ) : ?>
1145
  <?php
1146
+ $button_key = $this->get_repeater_setting_key( 'button', 'buttons', $index );
1147
+ $content_inner_key = $this->get_repeater_setting_key( 'content', 'buttons', $index );
1148
 
1149
  // Button Size
1150
+ $button_size = ( 'default' !== $item['single_button_size'] ) ? $item['single_button_size'] : $settings['button_size'];
1151
 
1152
  // Link
1153
  if ( ! empty( $item['link']['url'] ) ) {
1155
  }
1156
 
1157
  // Icon Position
1158
+ $icon_position = '';
1159
  if ( $settings['icon_position'] ) {
1160
+ $icon_position = 'pp-icon-' . $settings['icon_position'];
1161
  }
1162
  if ( $settings['icon_position_tablet'] ) {
1163
+ $icon_position .= ' pp-icon-' . $settings['icon_position_tablet'] . '-tablet';
1164
  }
1165
  if ( $settings['icon_position_mobile'] ) {
1166
+ $icon_position .= ' pp-icon-' . $settings['icon_position_mobile'] . '-mobile';
1167
  }
1168
 
1169
+ $this->add_render_attribute( $button_key, 'class', [
1170
+ 'pp-button',
1171
+ 'elementor-button',
1172
+ 'elementor-size-' . $button_size,
1173
+ 'elementor-repeater-item-' . $item['_id'],
1174
+ $button_animation,
1175
+ ] );
 
 
 
 
1176
 
1177
  // CSS ID
1178
  if ( $item['css_id'] ) {
1185
  }
1186
 
1187
  // ToolTip
1188
+ if ( 'yes' === $item['has_tooltip'] && ! empty( $item['tooltip_content'] ) ) {
1189
+ $ttip_position = $this->get_tooltip_position( $settings['tooltips_position'] );
1190
  $ttip_position_tablet = $this->get_tooltip_position( $settings['tooltips_position_tablet'] );
1191
  $ttip_position_mobile = $this->get_tooltip_position( $settings['tooltips_position_mobile'] );
1192
 
1204
 
1205
  $this->add_render_attribute(
1206
  $button_key,
1207
+ [
1208
+ 'data-tooltip' => htmlspecialchars( $item['tooltip_content'] ),
1209
+ 'data-tooltip-position' => $ttip_position,
1210
+ 'data-tooltip-position-tablet' => $ttip_tablet,
1211
+ 'data-tooltip-position-mobile' => $ttip_mobile,
1212
+ ]
1213
  );
1214
  }
1215
 
1216
+ $this->add_render_attribute( $content_inner_key, 'class', [
1217
+ 'pp-button-content-inner',
1218
+ $icon_position,
1219
+ ] );
 
 
 
 
1220
  ?>
1221
  <a <?php echo $this->get_render_attribute_string( $button_key ); ?>>
1222
  <div class="pp-button-content-wrapper">
1223
  <span <?php echo $this->get_render_attribute_string( $content_inner_key ); ?>>
1224
  <?php
1225
+ if ( 'none' !== $item['pp_icon_type'] ) {
1226
+ $icon_key = 'icon_' . $i;
1227
  $icon_wrap = 'pp-buttons-icon-wrapper';
1228
  $this->add_render_attribute( $icon_key, 'class', $icon_wrap );
1229
  $migration_allowed = Icons_Manager::is_migration_allowed();
1230
  ?>
1231
  <span <?php echo $this->get_render_attribute_string( $icon_key ); ?>>
1232
  <?php
1233
+ if ( 'icon' === $item['pp_icon_type'] ) {
1234
  // add old default
1235
  if ( ! isset( $item['icon'] ) && ! $migration_allowed ) {
1236
  $item['icon'] = isset( $fallback_defaults[ $index ] ) ? $fallback_defaults[ $index ] : 'fa fa-check';
1237
  }
1238
 
1239
  $migrated = isset( $item['__fa4_migrated']['selected_icon'] );
1240
+ $is_new = ! isset( $item['icon'] ) && $migration_allowed;
1241
 
1242
+ if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) ) { ?>
 
1243
  <span class="pp-button-icon pp-icon">
1244
  <?php
1245
  if ( $is_new || $migrated ) {
1246
+ Icons_Manager::render_icon( $item['selected_icon'], [
1247
+ 'class' => 'pp-button-icon',
1248
+ 'aria-hidden' => 'true',
1249
+ ] );
1250
+ } else { ?>
 
 
 
 
1251
  <i class="pp-button-icon <?php echo esc_attr( $item['icon'] ); ?>" aria-hidden="true"></i>
1252
  <?php
1253
  }
1255
  </span>
1256
  <?php
1257
  }
1258
+ } elseif ( 'image' === $item['pp_icon_type'] ) {
1259
  printf( '<span class="pp-button-icon-image"><img src="%1$s"></span>', esc_url( $item['icon_img']['url'] ) );
1260
+ } elseif ( 'text' === $item['pp_icon_type'] ) {
1261
  printf( '<span class="pp-button-icon pp-button-icon-number">%1$s</span>', esc_attr( $item['icon_text'] ) );
1262
  }
1263
  ?>
1264
  </span>
1265
  <?php
1266
  }
1267
+ if ( $item['text'] ) { ?>
 
1268
  <?php
1269
  $text_key = $this->get_repeater_setting_key( 'text', 'buttons', $index );
1270
  $this->add_render_attribute( $text_key, 'class', 'pp-button-title' );
1271
+ $this->add_inline_editing_attributes( $text_key, 'none' ); ?>
 
1272
 
1273
  <span <?php echo $this->get_render_attribute_string( $text_key ); ?>>
1274
  <?php
1279
  </span>
1280
  </div>
1281
  </a>
1282
+ <?php $i++;
1283
+ endforeach; ?>
1284
+ </div><?php
 
 
 
1285
  }
1286
 
1287
  protected function get_tooltip_position( $pos ) {
1288
  $tt_position = '';
1289
 
1290
+ switch ( $tt_position ) {
1291
+ case 'above':
1292
+ $tt_position = 'tt-top';
1293
+ break;
1294
+
1295
+ case 'below':
1296
+ $tt_position = 'tt-bottom';
1297
+ break;
1298
+
1299
+ case 'left':
1300
+ $tt_position = 'tt-left';
1301
+ break;
1302
+
1303
+ case 'right':
1304
+ $tt_position = 'tt-right';
1305
+ break;
1306
+
1307
+ default:
1308
+ $tt_position = 'tt-top';
1309
+ break;
1310
  }
1311
 
1312
  return $tt_position;
1317
  *
1318
  * Written as a Backbone JavaScript template and used to generate the live preview.
1319
  *
1320
+ * @since 2.1.3
1321
  * @access protected
1322
  */
1323
+ protected function content_template() {
1324
  ?>
1325
  <div class="pp-buttons-group">
1326
  <# var i = 1; #>
1414
  }
1415
  );
1416
  #>
 
1417
  <a {{{ view.getRenderAttributeString( button_key ) }}}>
1418
  <div class="pp-button-content-wrapper">
1419
  <span {{{ view.getRenderAttributeString( content_inner_key ) }}}>
1449
  <# } #>
1450
  </span>
1451
  <# } #>
1452
+
1453
  <# if ( item.text != '' ) { #>
1454
  <#
1455
  var text_key = 'text_' + i;
1458
 
1459
  view.addInlineEditingAttributes( text_key, 'none' );
1460
  #>
1461
+
1462
  <span {{{ view.getRenderAttributeString( text_key ) }}}>
1463
  {{{ item.text }}}
1464
  </span>
1470
  </div>
1471
  <?php
1472
  }
1473
+
1474
+ /**
1475
+ * Render divider widget output in the editor.
1476
+ *
1477
+ * Written as a Backbone JavaScript template and used to generate the live preview.
1478
+ *
1479
+ * Remove this after Elementor v3.3.0
1480
+ *
1481
+ * @since 1.0.0
1482
+ * @access protected
1483
+ */
1484
+ protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
1485
+ $this->content_template();
1486
+ }
1487
  }
modules/info-box/widgets/info-box-carousel.php CHANGED
@@ -2392,7 +2392,7 @@ endforeach;
2392
  $migrated = isset( $item['__fa4_migrated']['selected_icon'] );
2393
  $is_new = ! isset( $item['icon'] ) && $migration_allowed;
2394
 
2395
- if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) ) {
2396
  ?>
2397
  <span <?php echo $this->get_render_attribute_string( 'icon' ); ?>>
2398
  <?php if ( $item['icon_type'] == 'icon' ) { ?>
2392
  $migrated = isset( $item['__fa4_migrated']['selected_icon'] );
2393
  $is_new = ! isset( $item['icon'] ) && $migration_allowed;
2394
 
2395
+ if ( ! empty( $item['icon'] ) || ( ! empty( $item['selected_icon']['value'] ) && $is_new ) || ! empty( $item['image']['url'] ) ) {
2396
  ?>
2397
  <span <?php echo $this->get_render_attribute_string( 'icon' ); ?>>
2398
  <?php if ( $item['icon_type'] == 'icon' ) { ?>
package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "powerpack-lite-for-elementor",
3
- "version": "2.1.2",
4
  "description": "Extend Elementor Page Builder with 50+ Creative Widgets.",
5
  "keywords": [],
6
  "author": "IdeaBox Creations",
1
  {
2
  "name": "powerpack-lite-for-elementor",
3
+ "version": "2.1.3",
4
  "description": "Extend Elementor Page Builder with 50+ Creative Widgets.",
5
  "keywords": [],
6
  "author": "IdeaBox Creations",
powerpack-lite-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: PowerPack Lite for Elementor
4
  * Plugin URI: https://powerpackelements.com
5
  * Description: Custom addons for Elementor page builder.
6
- * Version: 2.1.2
7
  * Author: IdeaBox Creations
8
  * Author URI: http://ideabox.io/
9
  * License: GNU General Public License v2.0
@@ -14,7 +14,7 @@
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
16
 
17
- define( 'POWERPACK_ELEMENTS_LITE_VER', '2.1.2' );
18
  define( 'POWERPACK_ELEMENTS_LITE_PATH', plugin_dir_path( __FILE__ ) );
19
  define( 'POWERPACK_ELEMENTS_LITE_BASE', plugin_basename( __FILE__ ) );
20
  define( 'POWERPACK_ELEMENTS_LITE_URL', plugins_url( '/', __FILE__ ) );
@@ -27,9 +27,11 @@ require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-admin-settings.php
27
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-config.php';
28
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-helper.php';
29
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-posts-helper.php';
30
- require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-templates-lib.php';
31
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-wpml.php';
32
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'plugin.php';
 
 
 
33
 
34
  /**
35
  * Check if Elementor is installed
3
  * Plugin Name: PowerPack Lite for Elementor
4
  * Plugin URI: https://powerpackelements.com
5
  * Description: Custom addons for Elementor page builder.
6
+ * Version: 2.1.3
7
  * Author: IdeaBox Creations
8
  * Author URI: http://ideabox.io/
9
  * License: GNU General Public License v2.0
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
16
 
17
+ define( 'POWERPACK_ELEMENTS_LITE_VER', '2.1.3' );
18
  define( 'POWERPACK_ELEMENTS_LITE_PATH', plugin_dir_path( __FILE__ ) );
19
  define( 'POWERPACK_ELEMENTS_LITE_BASE', plugin_basename( __FILE__ ) );
20
  define( 'POWERPACK_ELEMENTS_LITE_URL', plugins_url( '/', __FILE__ ) );
27
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-config.php';
28
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-helper.php';
29
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-posts-helper.php';
 
30
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-wpml.php';
31
  require_once POWERPACK_ELEMENTS_LITE_PATH . 'plugin.php';
32
+ if ( did_action( 'elementor/loaded' ) ) {
33
+ require_once POWERPACK_ELEMENTS_LITE_PATH . 'classes/class-pp-templates-lib.php';
34
+ }
35
 
36
  /**
37
  * Check if Elementor is installed
readme.txt CHANGED
@@ -109,8 +109,9 @@ Want to connect us with more? We have an active Facebook Group where we keep pos
109
 
110
  ### TEMPLATE LIBRRAY FOR ELEMENTOR
111
 
112
- **Easiest, Fastest and Creative way to design websites!**
113
- https://www.youtube.com/watch?v=IoSvG1-0f4M&t=1s
 
114
 
115
  PowerPack template library includes 150+ ready-to-use section blocks. All block templates are precise work of our designers that can be used to create any website.
116
 
@@ -196,6 +197,11 @@ Not at all! All the widgets and settings are easy to use with drag & drop interf
196
 
197
  == Changelog ==
198
 
 
 
 
 
 
199
  = 2.1.2 - August 25, 2020 =
200
  * Enhancement: Compatibility to Elementor 3.0
201
 
109
 
110
  ### TEMPLATE LIBRRAY FOR ELEMENTOR
111
 
112
+ **Easiest, Fastest and Creative way to design websites!**
113
+
114
+ https://www.youtube.com/watch?v=IoSvG1-0f4M
115
 
116
  PowerPack template library includes 150+ ready-to-use section blocks. All block templates are precise work of our designers that can be used to create any website.
117
 
197
 
198
  == Changelog ==
199
 
200
+ = 2.1.3 - August 31, 2020 =
201
+ * Fixed: Buttons - Tooltip styling options were not working in buttons widget
202
+ * Fixed: Info Box Carousel - Icon type image was not showing on frontend
203
+ * Fixed: PHP error in template library
204
+
205
  = 2.1.2 - August 25, 2020 =
206
  * Enhancement: Compatibility to Elementor 3.0
207