Premium Addons for Elementor - Version 3.10.1

Version Description

  • Tweak: Added three new styles for ribbon in Pricing Table widget.
  • Fixed: Post Format Icon switcher not working for Classic skin in Blog widget.
Download this release

Release Info

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

Code changes from version 3.10.0 to 3.10.1

assets/frontend/css/premium-addons.css CHANGED
@@ -2422,8 +2422,8 @@ ul.premium-person-social-list {
2422
/*******************************************************/
2423
/*Pricing Table Container Div Style*/
2424
.premium-pricing-table-container {
2425
text-align: center;
2426
- overflow: hidden;
2427
-webkit-transition: all 0.3s ease-in-out;
2428
-moz-transition: all 0.3s ease-in-out;
2429
-o-transition: all 0.3s ease-in-out;
@@ -2440,35 +2440,102 @@ ul.premium-person-social-list {
2440
.premium-badge-left {
2441
left: 0;
2442
}
2443
- .premium-badge-left .corner {
2444
width: 0;
2445
height: 0;
2446
border-top: 150px solid;
2447
border-bottom: 150px solid transparent;
2448
border-right: 150px solid transparent;
2449
}
2450
- .premium-badge-right .corner {
2451
width: 0;
2452
height: 0;
2453
border-bottom: 150px solid transparent;
2454
border-right: 150px solid;
2455
border-left: 150px solid transparent;
2456
}
2457
- .premium-badge-left span, .premium-badge-right span{
2458
position:absolute;
2459
top: 35px;
2460
width: 100px;
2461
text-align: center;
2462
-webkit-transform: rotate(-45deg);
2463
transform: rotate(-45deg);
2464
display:block;
2465
text-transform: uppercase;
2466
}
2467
- .premium-badge-right span {
2468
-webkit-transform: rotate(45deg);
2469
transform: rotate(45deg);
2470
right: 0;
2471
}
2472
.premium-pricing-price-currency {
2473
position: relative;
2474
}
2422
/*******************************************************/
2423
/*Pricing Table Container Div Style*/
2424
.premium-pricing-table-container {
2425
+ position: relative;
2426
text-align: center;
2427
-webkit-transition: all 0.3s ease-in-out;
2428
-moz-transition: all 0.3s ease-in-out;
2429
-o-transition: all 0.3s ease-in-out;
2440
.premium-badge-left {
2441
left: 0;
2442
}
2443
+ .premium-badge-triangle.premium-badge-left .corner {
2444
width: 0;
2445
height: 0;
2446
border-top: 150px solid;
2447
border-bottom: 150px solid transparent;
2448
border-right: 150px solid transparent;
2449
}
2450
+ .premium-badge-triangle.premium-badge-right .corner {
2451
width: 0;
2452
height: 0;
2453
border-bottom: 150px solid transparent;
2454
border-right: 150px solid;
2455
border-left: 150px solid transparent;
2456
}
2457
+ .premium-badge-triangle span {
2458
position:absolute;
2459
top: 35px;
2460
width: 100px;
2461
text-align: center;
2462
-webkit-transform: rotate(-45deg);
2463
+ -moz-transform: rotate(-45deg);
2464
+ -ms-transform: rotate(-45deg);
2465
transform: rotate(-45deg);
2466
display:block;
2467
text-transform: uppercase;
2468
}
2469
+ .premium-badge-triangle.premium-badge-right span {
2470
-webkit-transform: rotate(45deg);
2471
+ -moz-transform: rotate(45deg);
2472
+ -ms-transform: rotate(45deg);
2473
transform: rotate(45deg);
2474
right: 0;
2475
}
2476
+ .premium-badge-circle {
2477
+ min-width: 4em;
2478
+ min-height: 4em;
2479
+ line-height: 4em;
2480
+ text-align: center;
2481
+ -webkit-border-radius: 100%;
2482
+ border-radius: 100%;
2483
+ position: absolute;
2484
+ z-index: 1;
2485
+ }
2486
+ .premium-badge-stripe {
2487
+ position: absolute;
2488
+ -webkit-transform: rotate(90deg);
2489
+ -ms-transform: rotate(90deg);
2490
+ transform: rotate(90deg);
2491
+ width: 15em;
2492
+ overflow: hidden;
2493
+ height: 15em;
2494
+ }
2495
+ .premium-badge-stripe.premium-badge-left {
2496
+ -webkit-transform: rotate(0);
2497
+ -ms-transform: rotate(0);
2498
+ transform: rotate(0);
2499
+ }
2500
+ .premium-badge-stripe .corner {
2501
+ text-align: center;
2502
+ left: 0;
2503
+ width: 150%;
2504
+ -webkit-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
2505
+ -ms-transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
2506
+ transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);
2507
+ margin-top: 35px;
2508
+ font-size: 13px;
2509
+ line-height: 2;
2510
+ font-weight: 800;
2511
+ text-transform: uppercase;
2512
+ }
2513
+ .premium-badge-flag .corner {
2514
+ text-align: center;
2515
+ -webkit-border-radius: 4px;
2516
+ border-radius: 4px 4px 0 4px;
2517
+ padding: 3px 15px;
2518
+ position: absolute;
2519
+ top: 10%;
2520
+ right: -8px;
2521
+ }
2522
+ .premium-badge-flag .corner::before,
2523
+ .premium-badge-flag .corner::after {
2524
+ content: "";
2525
+ display: block;
2526
+ position: absolute;
2527
+ width: 0;
2528
+ height: 0;
2529
+ top: 100%;
2530
+ right: 0;
2531
+ border-bottom: 8px solid transparent;
2532
+ }
2533
+ .elementor-widget-premium-addon-pricing-table .elementor-widget-container {
2534
+ overflow: visible !important;
2535
+ }
2536
+ .premium-badge-flag .corner::after {
2537
+ border-left: 8px solid rgba(0,0,0,.2)
2538
+ }
2539
.premium-pricing-price-currency {
2540
position: relative;
2541
}
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Premium Addons for Elementor
4
Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
Plugin URI: https://premiumaddons.com
6
- Version: 3.10.0
7
Author: Leap13
8
Author URI: https://leap13.com/
9
Text Domain: premium-addons-for-elementor
@@ -14,12 +14,12 @@ License: GNU General Public License v3.0
14
if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
16
// Define Constants
17
- define('PREMIUM_ADDONS_VERSION', '3.10.0');
18
define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
define('PREMIUM_ADDONS_FILE', __FILE__);
21
define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
- define('PREMIUM_ADDONS_STABLE_VERSION', '3.9.9');
23
24
if( ! class_exists('Premium_Addons_Elementor') ) {
25
3
Plugin Name: Premium Addons for Elementor
4
Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
Plugin URI: https://premiumaddons.com
6
+ Version: 3.10.1
7
Author: Leap13
8
Author URI: https://leap13.com/
9
Text Domain: premium-addons-for-elementor
14
if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
16
// Define Constants
17
+ define('PREMIUM_ADDONS_VERSION', '3.10.1');
18
define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
define('PREMIUM_ADDONS_FILE', __FILE__);
21
define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
+ define('PREMIUM_ADDONS_STABLE_VERSION', '3.10.0');
23
24
if( ! class_exists('Premium_Addons_Elementor') ) {
25
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_c
5
Requires at Least: 4.5
6
Tested Up To: 5.3
7
Requires PHP: 5.4
8
- Stable Tag: 3.10.0
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
@@ -175,6 +175,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
175
176
== Changelog ==
177
178
= 3.10.0 =
179
180
- Tweak: Premium Templates modal styling enhanced for Elementor Dark Mode.
5
Requires at Least: 4.5
6
Tested Up To: 5.3
7
Requires PHP: 5.4
8
+ Stable Tag: 3.10.1
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
175
176
== Changelog ==
177
178
+ = 3.10.1 =
179
+
180
+ - Tweak: Added three new styles for ribbon in Pricing Table widget.
181
+ - Fixed: `Post Format Icon` switcher not working for `Classic` skin in Blog widget.
182
+
183
= 3.10.0 =
184
185
- Tweak: Premium Templates modal styling enhanced for Elementor Dark Mode.
widgets/premium-blog.php CHANGED
@@ -1873,7 +1873,7 @@ class Premium_Blog extends Widget_Base {
1873
<div class="premium-blog-thumbnail-container <?php echo 'premium-blog-' . $image_effect . '-effect';?>">
1874
<?php $this->get_post_thumbnail( $target ); ?>
1875
</div>
1876
- <?php if( 'classic' !== $skin ): ?>
1877
<div class="premium-blog-effect-container <?php echo 'premium-blog-'. $post_effect . '-effect'; ?>">
1878
<a class="premium-blog-post-link" href="<?php the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>"></a>
1879
<?php if( $settings['premium_blog_hover_color_effect'] === 'bordered' ) : ?>
@@ -1884,9 +1884,11 @@ class Premium_Blog extends Widget_Base {
1884
</div>
1885
<?php else: ?>
1886
<div class="premium-blog-thumbnail-overlay">
1887
- <a class="elementor-icon" href="<?php the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>">
1888
- <?php echo $this->get_post_format_icon(); ?>
1889
- </a>
1890
</div>
1891
<?php endif; ?>
1892
</div>
1873
<div class="premium-blog-thumbnail-container <?php echo 'premium-blog-' . $image_effect . '-effect';?>">
1874
<?php $this->get_post_thumbnail( $target ); ?>
1875
</div>
1876
+ <?php if( 'classic' !== $skin ) : ?>
1877
<div class="premium-blog-effect-container <?php echo 'premium-blog-'. $post_effect . '-effect'; ?>">
1878
<a class="premium-blog-post-link" href="<?php the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>"></a>
1879
<?php if( $settings['premium_blog_hover_color_effect'] === 'bordered' ) : ?>
1884
</div>
1885
<?php else: ?>
1886
<div class="premium-blog-thumbnail-overlay">
1887
+ <?php if( $settings['premium_blog_post_format_icon'] === 'yes' ) : ?>
1888
+ <a class="elementor-icon" href="<?php the_permalink(); ?>" target="<?php echo esc_attr( $target ); ?>">
1889
+ <?php echo $this->get_post_format_icon(); ?>
1890
+ </a>
1891
+ <?php endif; ?>
1892
</div>
1893
<?php endif; ?>
1894
</div>
widgets/premium-grid.php CHANGED
@@ -972,7 +972,7 @@ class Premium_Grid extends Widget_Base {
972
973
$this->add_control('doc_1',
974
[
975
- 'raw' => sprintf( __( '%1$s Getting Started » %2$s', 'premium-addons-for-elementor' ), '<a href="https://premiumaddons.com/docs/grid-widget-tutorial/?utm_source=pa-dashboard&utm_medium=pa-editor&utm_campaign=pa-plugin" target="_blank" rel="noopener">', '</a>' ),
976
'type' => Controls_Manager::RAW_HTML,
977
'content_classes' => 'editor-pa-doc',
978
]
972
973
$this->add_control('doc_1',
974
[
975
+ 'raw' => sprintf( __( '%1$s Getting started » %2$s', 'premium-addons-for-elementor' ), '<a href="https://premiumaddons.com/docs/grid-widget-tutorial/?utm_source=pa-dashboard&utm_medium=pa-editor&utm_campaign=pa-plugin" target="_blank" rel="noopener">', '</a>' ),
976
'type' => Controls_Manager::RAW_HTML,
977
'content_classes' => 'editor-pa-doc',
978
]
widgets/premium-maps.php CHANGED
@@ -27,7 +27,7 @@ class Premium_Maps extends Widget_Base {
27
}
28
29
public function get_title() {
30
- return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __('Maps', 'premium-addons-for-elementor') );
31
}
32
33
public function get_icon() {
@@ -370,45 +370,66 @@ class Premium_Maps extends Widget_Base {
370
$this->end_controls_section();
371
372
$this->start_controls_section('premium_maps_custom_styling_section',
373
- [
374
- 'label' => __('Map Style', 'premium-addons-for-elementor'),
375
- ]
376
- );
377
378
$this->add_control('premium_maps_custom_styling',
379
- [
380
- 'label' => __('JSON Code', 'premium-addons-for-elementor'),
381
- 'type' => Controls_Manager::TEXTAREA,
382
- 'description' => 'Get your custom styling from <a href="https://snazzymaps.com/" target="_blank">here</a>',
383
- 'label_block' => true,
384
]
385
);
386
387
- /*End Map Options Section*/
388
$this->end_controls_section();
389
390
- /*Start Title Style Section*/
391
$this->start_controls_section('premium_maps_pin_title_style',
392
- [
393
- 'label' => __('Title', 'premium-addons-for-elementor'),
394
- 'tab' => Controls_Manager::TAB_STYLE,
395
- ]
396
- );
397
398
- /*Pin Title Color*/
399
$this->add_control('premium_maps_pin_title_color',
400
- [
401
- 'label' => __('Color', 'premium-addons-for-elementor'),
402
- 'type' => Controls_Manager::COLOR,
403
- 'scheme' => [
404
- 'type' => Scheme_Color::get_type(),
405
- 'value' => Scheme_Color::COLOR_1,
406
- ],
407
- 'selectors' => [
408
- '{{WRAPPER}} .premium-maps-info-title' => 'color: {{VALUE}};',
409
- ]
410
- ]
411
- );
412
413
$this->add_group_control(
414
Group_Control_Typography::get_type(),
27
}
28
29
public function get_title() {
30
+ return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __('Google Maps', 'premium-addons-for-elementor') );
31
}
32
33
public function get_icon() {
370
$this->end_controls_section();
371
372
$this->start_controls_section('premium_maps_custom_styling_section',
373
+ [
374
+ 'label' => __('Map Style', 'premium-addons-for-elementor'),
375
+ ]
376
+ );
377
378
$this->add_control('premium_maps_custom_styling',
379
+ [
380
+ 'label' => __('JSON Code', 'premium-addons-for-elementor'),
381
+ 'type' => Controls_Manager::TEXTAREA,
382
+ 'description' => 'Get your custom styling from <a href="https://snazzymaps.com/" target="_blank">here</a>',
383
+ 'label_block' => true,
384
]
385
);
386
387
$this->end_controls_section();
388
389
+ $this->start_controls_section('docs',
390
+ [
391
+ 'label' => __('Helpful Documentations', 'premium-addons-pro'),
392
+ ]
393
+ );
394
+
395
+ $this->add_control('doc_1',
396
+ [
397
+ 'raw' => sprintf( __( '%1$s Getting started » %2$s', 'premium-addons-for-elementor' ), '<a href="https://premiumaddons.com/docs/google-maps-widget-tutorial/?utm_source=pa-dashboard&utm_medium=pa-editor&utm_campaign=pa-plugin" target="_blank" rel="noopener">', '</a>' ),
398
+ 'type' => Controls_Manager::RAW_HTML,
399
+ 'content_classes' => 'editor-pa-doc',
400
+ ]
401
+ );
402
+
403
+ $this->add_control('doc_2',
404
+ [
405
+ 'raw' => sprintf( __( '%1$s Getting your API key » %2$s', 'premium-addons-for-elementor' ), '<a href="https://premiumaddons.com/docs/getting-your-api-key-for-google-reviews/?utm_source=pa-dashboard&utm_medium=pa-editor&utm_campaign=pa-plugin" target="_blank" rel="noopener">', '</a>' ),
406
+ 'type' => Controls_Manager::RAW_HTML,
407
+ 'content_classes' => 'editor-pa-doc',
408
+ ]
409
+ );
410
+
411
+ $this->end_controls_section();
412
+
413
$this->start_controls_section('premium_maps_pin_title_style',
414
+ [
415
+ 'label' => __('Title', 'premium-addons-for-elementor'),
416
+ 'tab' => Controls_Manager::TAB_STYLE,
417
+ ]
418
+ );
419
420
$this->add_control('premium_maps_pin_title_color',
421
+ [
422
+ 'label' => __('Color', 'premium-addons-for-elementor'),
423
+ 'type' => Controls_Manager::COLOR,
424
+ 'scheme' => [
425
+ 'type' => Scheme_Color::get_type(),
426
+ 'value' => Scheme_Color::COLOR_1,
427
+ ],
428
+ 'selectors' => [
429
+ '{{WRAPPER}} .premium-maps-info-title' => 'color: {{VALUE}};',
430
+ ]
431
+ ]
432
+ );
433
434
$this->add_group_control(
435
Group_Control_Typography::get_type(),
widgets/premium-pricing-table.php CHANGED
@@ -313,189 +313,294 @@ class Premium_Pricing_Table extends Widget_Base {
313
]
314
);
315
316
-
317
- /*Description Text*/
318
$this->add_control('premium_pricing_table_description_text',
319
- [
320
- 'label' => __('Description', 'premium-addons-for-elementor'),
321
- 'type' => Controls_Manager::WYSIWYG,
322
- 'dynamic' => [ 'active' => true ],
323
- 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
324
- ]
325
- );
326
327
$this->end_controls_section();
328
329
- /*Button Content Section*/
330
$this->start_controls_section('premium_pricing_table_button_section',
331
- [
332
- 'label' => __('Button', 'premium-addons-for-elementor'),
333
- 'condition' => [
334
- 'premium_pricing_table_button_switcher' => 'yes',
335
- ]
336
- ]
337
- );
338
-
339
-
340
- /*Button Text*/
341
- $this->add_control('premium_pricing_table_button_text',
342
- [
343
- 'label' => __('Text', 'premium-addons-for-elementor'),
344
- 'default' => __('Get Started' , 'premium-addons-for-elementor'),
345
- 'type' => Controls_Manager::TEXT,
346
- 'dynamic' => [ 'active' => true ],
347
- 'label_block' => true,
348
]
349
- );
350
351
- /*Button Url Type*/
352
$this->add_control('premium_pricing_table_button_url_type',
353
- [
354
- 'label' => __('Link Type', 'premium-addons-for-elementor'),
355
- 'type' => Controls_Manager::SELECT,
356
- 'options' => [
357
- 'url' => __('URL', 'premium-addons-for-elementor'),
358
- 'link' => __('Existing Page', 'premium-addons-for-elementor'),
359
- ],
360
- 'default' => 'url',
361
- 'label_block' => true,
362
- ]
363
- );
364
-
365
366
- /*Button url*/
367
$this->add_control('premium_pricing_table_button_link',
368
- [
369
- 'label' => __('Link', 'premium-addons-for-elementor'),
370
- 'type' => Controls_Manager::TEXT,
371
- 'dynamic' => [
372
- 'active' => true,
373
- 'categories' => [
374
- TagsModule::POST_META_CATEGORY,
375
- TagsModule::URL_CATEGORY
376
- ]
377
- ],
378
- 'condition' => [
379
- 'premium_pricing_table_button_url_type' => 'url',
380
- ],
381
- 'label_block' => true,
382
- ]
383
- );
384
385
- /*Button Link to existing content*/
386
$this->add_control('premium_pricing_table_button_link_existing_content',
387
- [
388
- 'label' => __('Existing Page', 'premium-addons-for-elementor'),
389
- 'type' => Controls_Manager::SELECT2,
390
- 'options' => $this->getTemplateInstance()->get_all_post(),
391
- 'condition' => [
392
- 'premium_pricing_table_button_url_type' => 'link',
393
- ],
394
- 'multiple' => false,
395
- 'label_block' => true,
396
- ]
397
- );
398
-
399
400
- /*Link Target*/
401
$this->add_control('premium_pricing_table_button_link_target',
402
- [
403
- 'label' => __('Link Target', 'premium-addons-for-elementor'),
404
- 'type' => Controls_Manager::SELECT,
405
- 'description' => __( ' Where would you like the link be opened?', 'premium-addons-for-elementor' ),
406
- 'options' => [
407
- 'blank' => 'Blank',
408
- 'parent' => 'Parent',
409
- 'self' => 'Self',
410
- 'top' => 'Top',
411
- ],
412
- 'default' => 'blank' ,
413
- 'label_block' => true,
414
- ]
415
- );
416
417
- /*End Button Settings Section*/
418
$this->end_controls_section();
419
420
- /*Button Content Section*/
421
- $this->start_controls_section('premium_pricing_table_bagde_section',
422
- [
423
- 'label' => __('Badge', 'premium-addons-for-elementor'),
424
- 'condition' => [
425
- 'premium_pricing_table_badge_switcher' => 'yes',
426
- ]
427
- ]
428
- );
429
430
$this->add_control('premium_pricing_table_badge_text',
431
- [
432
- 'label' => __('Text', 'premium-addons-for-elementor'),
433
- 'default' => __('Popular', 'premium-addons-for-elementor'),
434
- 'type' => Controls_Manager::TEXT,
435
- 'dynamic' => [ 'active' => true ],
436
- 'label_block' => true,
437
- ]
438
- );
439
440
$this->add_responsive_control('premium_pricing_table_badge_left_size',
441
- [
442
- 'label' => __('Size', 'premium-addons-for-elementor'),
443
- 'type' => Controls_Manager::SLIDER,
444
- 'range' => [
445
- 'px' => [
446
- 'min' => 1,
447
- 'max' => 300,
448
- ],
449
- ],
450
- 'selectors' => [
451
- '{{WRAPPER}} .premium-badge-left .corner' => 'border-top-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-right-width: {{SIZE}}px;'
452
- ],
453
- 'condition' => [
454
- 'premium_pricing_table_badge_position' => 'left'
455
- ]
456
- ]
457
- );
458
459
- $this->add_control('premium_pricing_table_badge_right_size',
460
- [
461
- 'label' => __('Size', 'premium-addons-for-elementor'),
462
- 'type' => Controls_Manager::SLIDER,
463
- 'range' => [
464
- 'px' => [
465
- 'min' => 1,
466
- 'max' => 300,
467
- ],
468
- ],
469
- 'selectors' => [
470
- '{{WRAPPER}} .premium-badge-right .corner' => 'border-right-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-left-width: {{SIZE}}px;'
471
- ],
472
- 'condition' => [
473
- 'premium_pricing_table_badge_position' => 'right'
474
- ]
475
- ]
476
- );
477
478
$this->add_control('premium_pricing_table_badge_position',
479
- [
480
- 'label' => __('Position', 'premium-addons-for-elementor'),
481
- 'type' => Controls_Manager::SELECT,
482
- 'options' => [
483
- 'right' => __('Right', 'premium-addons-for-elementor'),
484
- 'left' => __('Left', 'premium-addons-for-elementor'),
485
],
486
- 'default' => 'right',
487
]
488
- );
489
490
- $this->end_controls_section();
491
492
- /* Start Title Settings Section */
493
- $this->start_controls_section('premium_pricing_table_title',
494
- [
495
- 'label' => __('Display Options', 'premium-addons-for-elementor'),
496
]
497
- );
498
499
$this->add_control('premium_pricing_table_icon_switcher',
500
[
501
'label' => __('Icon', 'premium-addons-for-elementor'),
@@ -504,201 +609,194 @@ class Premium_Pricing_Table extends Widget_Base {
504
);
505
506
$this->add_control('premium_pricing_table_title_switcher',
507
- [
508
- 'label' => __('Title', 'premium-addons-for-elementor'),
509
- 'type' => Controls_Manager::SWITCHER,
510
- 'default' => 'yes',
511
- ]
512
- );
513
514
$this->add_control('premium_pricing_table_price_switcher',
515
- [
516
- 'label' => __('Price', 'premium-addons-for-elementor'),
517
- 'type' => Controls_Manager::SWITCHER,
518
- 'default' => 'yes',
519
- ]
520
- );
521
522
$this->add_control('premium_pricing_table_list_switcher',
523
- [
524
- 'label' => __('Features', 'premium-addons-for-elementor'),
525
- 'type' => Controls_Manager::SWITCHER,
526
- 'default' => 'yes',
527
- ]
528
- );
529
530
$this->add_control('premium_pricing_table_description_switcher',
531
- [
532
- 'label' => __('Description', 'premium-addons-for-elementor'),
533
- 'type' => Controls_Manager::SWITCHER,
534
- ]
535
- );
536
537
$this->add_control('premium_pricing_table_button_switcher',
538
- [
539
- 'label' => __('Button', 'premium-addons-for-elementor'),
540
- 'type' => Controls_Manager::SWITCHER,
541
- 'default' => 'yes',
542
- ]
543
- );
544
545
$this->add_control('premium_pricing_table_badge_switcher',
546
- [
547
- 'label' => __('Badge', 'premium-addons-for-elementor'),
548
- 'type' => Controls_Manager::SWITCHER,
549
- 'default' => 'yes',
550
- ]
551
- );
552
553
$this->end_controls_section();
554
555
- /*Start Styling Section*/
556
- /*Start Icon Style Settings */
557
$this->start_controls_section('premium_pricing_icon_style_settings',
558
- [
559
- 'label' => __('Icon', 'premium-addons-for-elementor'),
560
- 'tab' => Controls_Manager::TAB_STYLE,
561
- 'condition' => [
562
- 'premium_pricing_table_icon_switcher' => 'yes',
563
- ]
564
]
565
- );
566
567
- /*Icon Color*/
568
$this->add_control('premium_pricing_icon_color',
569
- [
570
- 'label' => __('Color', 'premium-addons-for-elementor'),
571
- 'type' => Controls_Manager::COLOR,
572
- 'scheme' => [
573
- 'type' => Scheme_Color::get_type(),
574
- 'value' => Scheme_Color::COLOR_2,
575
- ],
576
- 'selectors' => [
577
- '{{WRAPPER}} .premium-pricing-icon-container i' => 'color: {{VALUE}};'
578
- ]
579
- ]
580
- );
581
-
582
$this->add_responsive_control('premium_pricing_icon_size',
583
- [
584
- 'label' => __('Size', 'premium-addons-for-elementor'),
585
- 'type' => Controls_Manager::SLIDER,
586
- 'default' => [
587
- 'size' => 25,
588
- ],
589
- 'selectors' => [
590
- '{{WRAPPER}} .premium-pricing-icon-container i' => 'font-size: {{SIZE}}px',
591
- '{{WRAPPER}} .premium-pricing-icon-container svg' => 'width: {{SIZE}}px; height: {{SIZE}}px'
592
- ]
593
]
594
- );
595
596
$this->add_control('premium_pricing_icon_back_color',
597
- [
598
- 'label' => __('Background Color', 'premium-addons-for-elementor'),
599
- 'type' => Controls_Manager::COLOR,
600
- 'scheme' => [
601
- 'type' => Scheme_Color::get_type(),
602
- 'value' => Scheme_Color::COLOR_1,
603
- ],
604
- 'selectors' => [
605
- '{{WRAPPER}} .premium-pricing-icon-container i' => 'background-color: {{VALUE}};'
606
- ]
607
- ]
608
- );
609
610
$this->add_responsive_control('premium_pricing_icon_inner_padding',
611
- [
612
- 'label' => __('Padding', 'premium-addons-for-elementor'),
613
- 'type' => Controls_Manager::SLIDER,
614
- 'size_units' => ['px','em'],
615
- 'default' => [
616
- 'size' => 10,
617
- 'unit' => 'px'
618
- ],
619
- 'selectors' => [
620
- '{{WRAPPER}} .premium-pricing-icon-container i' => 'padding: {{SIZE}}{{UNIT}};',
621
- ]
622
]
623
- );
624
625
$this->add_group_control(
626
Group_Control_Border::get_type(),
627
- [
628
- 'name' => 'premium_pricing_icon_inner_border',
629
- 'selector' => '{{WRAPPER}} .premium-pricing-icon-container i',
630
- ]
631
- );
632
633
$this->add_control('premium_pricing_icon_inner_radius',
634
- [
635
- 'label' => __('Border Radius', 'premium-addons-for-elementor'),
636
- 'type' => Controls_Manager::SLIDER,
637
- 'size_units' => ['px', '%' , 'em'],
638
- 'default' => [
639
- 'size' => 100,
640
- 'unit' => 'px'
641
- ],
642
- 'selectors' => [
643
- '{{WRAPPER}} .premium-pricing-icon-container i' => 'border-radius: {{SIZE}}{{UNIT}};',
644
- ],
645
- 'separator' => 'after'
646
- ]
647
- );
648
649
$this->add_control('premium_pricing_icon_container_heading',
650
- [
651
- 'label' => __('Container', 'premium-addons-for-elementor'),
652
- 'type' => Controls_Manager::HEADING,
653
- ]
654
- );
655
656
- /*Icon Background*/
657
$this->add_group_control(
658
Group_Control_Background::get_type(),
659
- [
660
- 'name' => 'premium_pricing_table_icon_background',
661
- 'types' => [ 'classic' , 'gradient' ],
662
- 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
663
- ]
664
- );
665
666
- /*Icon Border*/
667
$this->add_group_control(
668
Group_Control_Border::get_type(),
669
- [
670
- 'name' => 'premium_pricing_icon_border',
671
- 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
672
- ]
673
- );
674
675
- /*Icon Border Radius*/
676
$this->add_control('premium_pricing_icon_border_radius',
677
- [
678
- 'label' => __('Border Radius', 'premium-addons-for-elementor'),
679
- 'type' => Controls_Manager::SLIDER,
680
- 'size_units' => ['px', '%' ,'em'],
681
- 'selectors' => [
682
- '{{WRAPPER}} .premium-pricing-icon-container' => 'border-radius: {{SIZE}}{{UNIT}};'
683
- ]
684
]
685
- );
686
687
- /*Icon Margin*/
688
$this->add_responsive_control('premium_pricing_icon_margin',
689
- [
690
- 'label' => __('Margin', 'premium-addons-for-elementor'),
691
- 'type' => Controls_Manager::DIMENSIONS,
692
- 'size_units' => ['px', 'em', '%'],
693
- 'default' => [
694
- 'top' => 50,
695
- 'right' => 0,
696
- 'bottom'=> 20,
697
- 'left' => 0,
698
- 'unit' => 'px',
699
- ],
700
- 'selectors' => [
701
- '{{WRAPPER}} .premium-pricing-icon-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
702
]
703
]
704
);
@@ -1638,38 +1736,38 @@ class Premium_Pricing_Table extends Widget_Base {
1638
1639
/*Button Border Radius*/
1640
$this->add_control('premium_pricing_table_button_border_radius_hover',
1641
- [
1642
- 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1643
- 'type' => Controls_Manager::SLIDER,
1644
- 'size_units' => ['px', 'em' , '%' ],
1645
- 'selectors' => [
1646
- '{{WRAPPER}} .premium-pricing-price-button:hover' => 'border-radius: {{SIZE}}{{UNIT}};'
1647
- ]
1648
]
1649
- );
1650
1651
/*Button Shadow*/
1652
$this->add_group_control(
1653
Group_Control_Box_Shadow::get_type(),
1654
- [
1655
- 'label' => __('Shadow','premium-addons-for-elementor'),
1656
- 'name' => 'premium_pricing_table_button_shadow_hover',
1657
- 'selector' => '{{WRAPPER}} .premium-pricing-price-button:hover',
1658
- ]
1659
- );
1660
1661
/*Button Margin*/
1662
$this->add_responsive_control('premium_pricing_button_margin_hover',
1663
- [
1664
- 'label' => __('Margin', 'premium-addons-for-elementor'),
1665
- 'type' => Controls_Manager::DIMENSIONS,
1666
- 'size_units' => ['px', 'em', '%'],
1667
- 'selectors' => [
1668
- '{{WRAPPER}} .premium-pricing-price-button:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1669
- ]
1670
- ]);
1671
1672
- /*Button Padding*/
1673
$this->add_responsive_control('premium_pricing_button_padding_hover',
1674
[
1675
'label' => __('Padding', 'premium-addons-for-elementor'),
@@ -1690,299 +1788,270 @@ class Premium_Pricing_Table extends Widget_Base {
1690
1691
$this->end_controls_tab();
1692
1693
- $this->end_controls_tabs();
1694
-
1695
- /*End Button Style Section*/
1696
- $this->end_controls_section();
1697
-
1698
- $this->start_controls_section('premium_pricing_table_badge_style',
1699
- [
1700
- 'label' => __('Badge', 'premium-addons-for-elementor'),
1701
- 'tab' => Controls_Manager::TAB_STYLE,
1702
- 'condition' => [
1703
- 'premium_pricing_table_badge_switcher' => 'yes'
1704
- ]
1705
- ]
1706
- );
1707
-
1708
- $this->add_control('premium_pricing_badge_text_color',
1709
- [
1710
- 'label' => __('Text Color', 'premium-addons-for-elementor'),
1711
- 'type' => Controls_Manager::COLOR,
1712
- 'scheme' => [
1713
- 'type' => Scheme_Color::get_type(),
1714
- 'value' => Scheme_Color::COLOR_2,
1715
- ],
1716
- 'selectors' => [
1717
- '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'color: {{VALUE}};'
1718
- ]
1719
- ]
1720
- );
1721
-
1722
-
1723
- $this->add_group_control(
1724
- Group_Control_Typography::get_type(),
1725
- [
1726
- 'name' => 'badge_text_typo',
1727
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1728
- 'selector' => '{{WRAPPER}} .premium-pricing-badge-container .corner span',
1729
- ]
1730
- );
1731
-
1732
- $this->add_responsive_control('premium_pricing_table_badge_right_top',
1733
- [
1734
- 'label' => __('Vertical Distance', 'premium-addons-for-elementor'),
1735
- 'type' => Controls_Manager::SLIDER,
1736
- 'range' => [
1737
- 'px'=> [
1738
- 'min' => 1,
1739
- 'max' => 200,
1740
- ]
1741
- ],
1742
- 'selectors' => [
1743
- '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'top: {{SIZE}}px;'
1744
- ],
1745
- ]
1746
- );
1747
1748
- $this->add_responsive_control('premium_pricing_table_badge_right_right',
1749
- [
1750
- 'label' => __('Horizontal Distance', 'premium-addons-for-elementor'),
1751
- 'type' => Controls_Manager::SLIDER,
1752
- 'range' => [
1753
- 'px'=> [
1754
- 'min' => 1,
1755
- 'max' => 170,
1756
- ]
1757
- ],
1758
- 'selectors' => [
1759
- '{{WRAPPER}} .premium-badge-right .corner span' => 'right: {{SIZE}}px;'
1760
- ],
1761
- 'condition' => [
1762
- 'premium_pricing_table_badge_position' => 'right'
1763
- ]
1764
- ]
1765
- );
1766
1767
- $this->add_responsive_control('premium_pricing_table_badge_right_left',
1768
- [
1769
- 'label' => __('Horizontal Distance', 'premium-addons-for-elementor'),
1770
- 'type' => Controls_Manager::SLIDER,
1771
- 'selectors' => [
1772
- '{{WRAPPER}} .premium-badge-left .corner span' => 'left: {{SIZE}}px;'
1773
- ],
1774
- 'condition' => [
1775
- 'premium_pricing_table_badge_position' => 'left'
1776
- ]
1777
- ]
1778
- );
1779
1780
- /*Badge Color*/
1781
$this->add_control('premium_pricing_badge_left_color',
1782
- [
1783
- 'label' => __('Background Color', 'premium-addons-for-elementor'),
1784
- 'type' => Controls_Manager::COLOR,
1785
- 'scheme' => [
1786
- 'type' => Scheme_Color::get_type(),
1787
- 'value' => Scheme_Color::COLOR_1,
1788
- ],
1789
- 'selectors' => [
1790
- '{{WRAPPER}} .premium-badge-left .corner' => 'border-top-color: {{VALUE}};'
1791
- ],
1792
- 'condition' => [
1793
- 'premium_pricing_table_badge_position' => 'left'
1794
- ]
1795
- ]
1796
- );
1797
1798
$this->add_control('premium_pricing_badge_right_color',
1799
- [
1800
- 'label' => __('Background Color', 'premium-addons-for-elementor'),
1801
- 'type' => Controls_Manager::COLOR,
1802
- 'scheme' => [
1803
- 'type' => Scheme_Color::get_type(),
1804
- 'value' => Scheme_Color::COLOR_1,
1805
- ],
1806
- 'selectors' => [
1807
- '{{WRAPPER}} .premium-badge-right .corner' => 'border-right-color: {{VALUE}};'
1808
- ],
1809
- 'condition' => [
1810
- 'premium_pricing_table_badge_position' => 'right'
1811
- ]
1812
- ]
1813
- );
1814
1815
$this->end_controls_section();
1816
1817
- /*Start Box Style Settings*/
1818
$this->start_controls_section('premium_pricing_box_style_settings',
1819
- [
1820
- 'label' => __('Box Settings', 'premium-addons-for-elementor'),
1821
- 'tab' => Controls_Manager::TAB_STYLE,
1822
- ]
1823
- );
1824
1825
$this->start_controls_tabs('premium_pricing_table_box_style_tabs');
1826
1827
$this->start_controls_tab('premium_pricing_table_box_style_normal',
1828
- [
1829
- 'label' => __('Normal', 'premium-addons-for-elementor'),
1830
- ]
1831
- );
1832
1833
- /*Box Background*/
1834
$this->add_group_control(
1835
Group_Control_Background::get_type(),
1836
- [
1837
- 'name' => 'premium_pricing_table_box_background',
1838
- 'types' => [ 'classic' , 'gradient' ],
1839
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1840
- ]
1841
- );
1842
1843
- /*Box Border*/
1844
$this->add_group_control(
1845
Group_Control_Border::get_type(),
1846
- [
1847
- 'name' => 'premium_pricing_table_box_border',
1848
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1849
- ]
1850
- );
1851
1852
- /*Box Border Radius*/
1853
$this->add_control('premium_pricing_table_box_border_radius',
1854
- [
1855
- 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1856
- 'type' => Controls_Manager::SLIDER,
1857
- 'size_units' => ['px', '%' ,'em'],
1858
- 'selectors' => [
1859
- '{{WRAPPER}} .premium-pricing-table-container' => 'border-radius: {{SIZE}}{{UNIT}};'
1860
- ]
1861
]
1862
- );
1863
1864
- /*Box Shadow*/
1865
$this->add_group_control(
1866
Group_Control_Box_Shadow::get_type(),
1867
- [
1868
- 'label' => __('Shadow','premium-addons-for-elementor'),
1869
- 'name' => 'premium_pricing_table_box_shadow',
1870
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1871
- ]
1872
- );
1873
1874
- /*Box Margin*/
1875
$this->add_responsive_control('premium_pricing_box_margin',
1876
- [
1877
- 'label' => __('Margin', 'premium-addons-for-elementor'),
1878
- 'type' => Controls_Manager::DIMENSIONS,
1879
- 'size_units' => ['px', 'em', '%'],
1880
- 'selectors' => [
1881
- '{{WRAPPER}} .premium-pricing-table-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1882
- ]
1883
- ]);
1884
1885
- /*Box Padding*/
1886
$this->add_responsive_control('premium_pricing_box_padding',
1887
- [
1888
- 'label' => __('Padding', 'premium-addons-for-elementor'),
1889
- 'type' => Controls_Manager::DIMENSIONS,
1890
- 'size_units' => ['px', 'em', '%'],
1891
- 'default' => [
1892
- 'top' => 40,
1893
- 'right' => 0,
1894
- 'bottom'=> 0,
1895
- 'left' => 0,
1896
- 'unit' => 'px',
1897
- ],
1898
- 'selectors' => [
1899
- '{{WRAPPER}} .premium-pricing-table-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1900
- ]
1901
- ]);
1902
1903
$this->end_controls_tab();
1904
1905
$this->start_controls_tab('premium_pricing_table_box_style_hover',
1906
- [
1907
- 'label' => __('Hover', 'premium-addons-for-elementor'),
1908
]
1909
);
1910
1911
$this->add_group_control(
1912
Group_Control_Background::get_type(),
1913
- [
1914
- 'name' => 'premium_pricing_table_box_background_hover',
1915
- 'types' => [ 'classic' , 'gradient' ],
1916
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
1917
- ]
1918
- );
1919
-
1920
1921
- /*Box Border*/
1922
$this->add_group_control(
1923
Group_Control_Border::get_type(),
1924
- [
1925
- 'name' => 'premium_pricing_table_box_border_hover',
1926
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
1927
- ]
1928
- );
1929
1930
- /*Box Border Radius*/
1931
$this->add_control('premium_pricing_table_box_border_radius_hover',
1932
- [
1933
- 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1934
- 'type' => Controls_Manager::SLIDER,
1935
- 'size_units' => ['px', 'em' , '%' ],
1936
- 'selectors' => [
1937
- '{{WRAPPER}} .premium-pricing-table-container:hover' => 'border-radius: {{SIZE}}{{UNIT}};'
1938
- ]
1939
]
1940
- );
1941
1942
- /*Box Shadow*/
1943
$this->add_group_control(
1944
Group_Control_Box_Shadow::get_type(),
1945
- [
1946
- 'label' => __('Shadow','premium-addons-for-elementor'),
1947
- 'name' => 'premium_pricing_table_box_shadow_hover',
1948
- 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
1949
- ]
1950
- );
1951
1952
- /*Box Margin*/
1953
$this->add_responsive_control('premium_pricing_box_margin_hover',
1954
- [
1955
- 'label' => __('Margin', 'premium-addons-for-elementor'),
1956
- 'type' => Controls_Manager::DIMENSIONS,
1957
- 'size_units' => ['px', 'em', '%'],
1958
- 'selectors' => [
1959
- '{{WRAPPER}} .premium-pricing-table-container:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1960
- ]
1961
- ]);
1962
1963
- /*Box Padding*/
1964
$this->add_responsive_control('premium_pricing_box_padding_hover',
1965
- [
1966
- 'label' => __('Padding', 'premium-addons-for-elementor'),
1967
- 'type' => Controls_Manager::DIMENSIONS,
1968
- 'size_units' => ['px', 'em', '%'],
1969
- 'default' => [
1970
- 'top' => 40,
1971
- 'right' => 0,
1972
- 'bottom'=> 0,
1973
- 'left' => 0,
1974
- 'unit' => 'px',
1975
- ],
1976
- 'selectors' => [
1977
- '{{WRAPPER}} .premium-pricing-table-container:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1978
- ]
1979
- ]);
1980
1981
$this->end_controls_tab();
1982
1983
$this->end_controls_tabs();
1984
1985
- /*End Box Style Settings*/
1986
$this->end_controls_section();
1987
1988
@@ -2002,11 +2071,20 @@ class Premium_Pricing_Table extends Widget_Base {
2002
2003
$link_type = $settings['premium_pricing_table_button_url_type'];
2004
2005
- $badge_position = 'premium-badge-' . $settings['premium_pricing_table_badge_position'];
2006
2007
- if($link_type == 'link'){
2008
$link_url = get_permalink($settings['premium_pricing_table_button_link_existing_content']);
2009
- } elseif ($link_type == 'url') {
2010
$link_url = $settings['premium_pricing_table_button_link'];
2011
}
2012
@@ -2023,9 +2101,9 @@ class Premium_Pricing_Table extends Widget_Base {
2023
?>
2024
2025
<div class="premium-pricing-table-container">
2026
- <?php if($settings['premium_pricing_table_badge_switcher']) : ?>
2027
- <div class="premium-pricing-badge-container <?php echo esc_attr($badge_position); ?>">
2028
- <div class="corner"><span><?php echo $settings['premium_pricing_table_badge_text']; ?></span></div>
2029
</div>
2030
<?php endif;
2031
if( $settings['premium_pricing_table_icon_switcher'] == 'yes' ) : ?>
@@ -2116,21 +2194,30 @@ class Premium_Pricing_Table extends Widget_Base {
2116
2117
var titleTag = settings.premium_pricing_table_title_size,
2118
linkType = settings.premium_pricing_table_button_url_type,
2119
- badgePosition = 'premium-badge-' + settings.premium_pricing_table_badge_position,
2120
linkURL = 'link' === linkType ? settings.premium_pricing_table_button_link_existing_content : settings.premium_pricing_table_button_link;
2121
-
2122
if( 'yes' === settings.premium_pricing_table_icon_switcher ) {
2123
var iconHTML = elementor.helpers.renderIcon( view, settings.premium_pricing_table_icon_selection_updated, { 'aria-hidden': true }, 'i' , 'object' ),
2124
migrated = elementor.helpers.isIconMigrated( settings, 'premium_pricing_table_icon_selection_updated' );
2125
}
2126
2127
2128
#>
2129
2130
<div class="premium-pricing-table-container">
2131
<# if('yes' === settings.premium_pricing_table_badge_switcher ) { #>
2132
- <div class="premium-pricing-badge-container {{ badgePosition }}">
2133
- <div class="corner"><span>{{{ settings.premium_pricing_table_badge_text }}}</span></div>
2134
</div>
2135
<# } #>
2136
<# if( 'yes' === settings.premium_pricing_table_icon_switcher ) { #>
313
]
314
);
315
316
$this->add_control('premium_pricing_table_description_text',
317
+ [
318
+ 'label' => __('Description', 'premium-addons-for-elementor'),
319
+ 'type' => Controls_Manager::WYSIWYG,
320
+ 'dynamic' => [ 'active' => true ],
321
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
322
+ ]
323
+ );
324
325
$this->end_controls_section();
326
327
$this->start_controls_section('premium_pricing_table_button_section',
328
+ [
329
+ 'label' => __('Button', 'premium-addons-for-elementor'),
330
+ 'condition' => [
331
+ 'premium_pricing_table_button_switcher' => 'yes',
332
]
333
+ ]
334
+ );
335
336
+ $this->add_control('premium_pricing_table_button_text',
337
+ [
338
+ 'label' => __('Text', 'premium-addons-for-elementor'),
339
+ 'default' => __('Get Started' , 'premium-addons-for-elementor'),
340
+ 'type' => Controls_Manager::TEXT,
341
+ 'dynamic' => [ 'active' => true ],
342
+ 'label_block' => true,
343
+ ]
344
+ );
345
+
346
$this->add_control('premium_pricing_table_button_url_type',
347
+ [
348
+ 'label' => __('Link Type', 'premium-addons-for-elementor'),
349
+ 'type' => Controls_Manager::SELECT,
350
+ 'options' => [
351
+ 'url' => __('URL', 'premium-addons-for-elementor'),
352
+ 'link' => __('Existing Page', 'premium-addons-for-elementor'),
353
+ ],
354
+ 'default' => 'url',
355
+ 'label_block' => true,
356
+ ]
357
+ );
358
359
$this->add_control('premium_pricing_table_button_link',
360
+ [
361
+ 'label' => __('Link', 'premium-addons-for-elementor'),
362
+ 'type' => Controls_Manager::TEXT,
363
+ 'dynamic' => [
364
+ 'active' => true,
365
+ 'categories' => [
366
+ TagsModule::POST_META_CATEGORY,
367
+ TagsModule::URL_CATEGORY
368
+ ]
369
+ ],
370
+ 'condition' => [
371
+ 'premium_pricing_table_button_url_type' => 'url',
372
+ ],
373
+ 'label_block' => true,
374
+ ]
375
+ );
376
377
$this->add_control('premium_pricing_table_button_link_existing_content',
378
+ [
379
+ 'label' => __('Existing Page', 'premium-addons-for-elementor'),
380
+ 'type' => Controls_Manager::SELECT2,
381
+ 'options' => $this->getTemplateInstance()->get_all_post(),
382
+ 'condition' => [
383
+ 'premium_pricing_table_button_url_type' => 'link',
384
+ ],
385
+ 'multiple' => false,
386
+ 'label_block' => true,
387
+ ]
388
+ );
389
390
$this->add_control('premium_pricing_table_button_link_target',
391
+ [
392
+ 'label' => __('Link Target', 'premium-addons-for-elementor'),
393
+ 'type' => Controls_Manager::SELECT,
394
+ 'description' => __( ' Where would you like the link be opened?', 'premium-addons-for-elementor' ),
395
+ 'options' => [
396
+ 'blank' => 'Blank',
397
+ 'parent' => 'Parent',
398
+ 'self' => 'Self',
399
+ 'top' => 'Top',
400
+ ],
401
+ 'default' => 'blank' ,
402
+ 'label_block' => true,
403
+ ]
404
+ );
405
406
$this->end_controls_section();
407
408
+ $this->start_controls_section('premium_pricing_table_ribbon_section',
409
+ [
410
+ 'label' => __('Ribbon', 'premium-addons-for-elementor'),
411
+ 'condition' => [
412
+ 'premium_pricing_table_badge_switcher' => 'yes',
413
+ ]
414
+ ]
415
+ );
416
+
417
+ $this->add_control('ribbon_type',
418
+ [
419
+ 'label' => __('Type', 'premium-addons-for-elementor'),
420
+ 'type' => Controls_Manager::SELECT,
421
+ 'options' => [
422
+ 'triangle' => __('Triangle', 'premium-addons-for-elementor'),
423
+ 'circle' => __('Circle', 'premium-addons-for-elementor'),
424
+ 'stripe' => __('Stripe', 'premium-addons-for-elementor'),
425
+ 'flag' => __('Flag', 'premium-addons-for-elementor'),
426
+ ],
427
+ 'default' => 'triangle'
428
+ ]
429
+ );
430
431
$this->add_control('premium_pricing_table_badge_text',
432
+ [
433
+ 'label' => __('Text', 'premium-addons-for-elementor'),
434
+ 'default' => __('NEW', 'premium-addons-for-elementor'),
435
+ 'type' => Controls_Manager::TEXT,
436
+ 'dynamic' => [ 'active' => true ],
437
+ 'label_block' => true,
438
+ ]
439
+ );
440
441
$this->add_responsive_control('premium_pricing_table_badge_left_size',
442
+ [
443
+ 'label' => __('Size', 'premium-addons-for-elementor'),
444
+ 'type' => Controls_Manager::SLIDER,
445
+ 'range' => [
446
+ 'px' => [
447
+ 'min' => 1,
448
+ 'max' => 300,
449
+ ],
450
+ ],
451
+ 'selectors' => [
452
+ '{{WRAPPER}} .premium-badge-triangle.premium-badge-left .corner' => 'border-top-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-right-width: {{SIZE}}px;'
453
+ ],
454
+ 'condition' => [
455
+ 'ribbon_type' => 'triangle',
456
+ 'premium_pricing_table_badge_position' => 'left'
457
+ ]
458
+ ]
459
+ );
460
461
+ $this->add_responsive_control('premium_pricing_table_badge_right_size',
462
+ [
463
+ 'label' => __('Size', 'premium-addons-for-elementor'),
464
+ 'type' => Controls_Manager::SLIDER,
465
+ 'range' => [
466
+ 'px' => [
467
+ 'min' => 1,
468
+ 'max' => 300,
469
+ ],
470
+ ],
471
+ 'selectors' => [
472
+ '{{WRAPPER}} .premium-badge-triangle.premium-badge-right .corner' => 'border-right-width: {{SIZE}}px; border-bottom-width: {{SIZE}}px; border-left-width: {{SIZE}}px;'
473
+ ],
474
+ 'condition' => [
475
+ 'ribbon_type' => 'triangle',
476
+ 'premium_pricing_table_badge_position' => 'right'
477
+ ]
478
+ ]
479
+ );
480
481
+ $this->add_responsive_control('circle_ribbon_size',
482
+ [
483
+ 'label' => __('Size', 'premium-addons-for-elementor'),
484
+ 'type' => Controls_Manager::SLIDER,
485
+ 'range' => [
486
+ 'px' => [
487
+ 'min' => 1,
488
+ 'max' => 10,
489
+ ],
490
+ ],
491
+ 'selectors' => [
492
+ '{{WRAPPER}} .premium-badge-circle' => 'min-width: {{SIZE}}em; min-height: {{SIZE}}em; line-height: {{SIZE}}'
493
+ ],
494
+ 'condition' => [
495
+ 'ribbon_type' => 'circle'
496
+ ]
497
+ ]
498
+ );
499
+
500
$this->add_control('premium_pricing_table_badge_position',
501
+ [
502
+ 'label' => __( 'Position', 'premium-addons-for-elementor' ),
503
+ 'type' => Controls_Manager::CHOOSE,
504
+ 'toggle' => false,
505
+ 'options' => [
506
+ 'left' => [
507
+ 'title' => __( 'Left', 'premium-addons-for-elementor' ),
508
+ 'icon' => 'eicon-h-align-left',
509
+ ],
510
+ 'right' => [
511
+ 'title' => __( 'Right', 'premium-addons-for-elementor' ),
512
+ 'icon' => 'eicon-h-align-right',
513
+ ],
514
+ ],
515
+ 'default' => 'right'
516
+ ]
517
+ );
518
+
519
+ $this->add_responsive_control('premium_pricing_table_badge_right_right',
520
+ [
521
+ 'label' => __('Horizontal Offset', 'premium-addons-for-elementor'),
522
+ 'type' => Controls_Manager::SLIDER,
523
+ 'size_units'=> [ 'px', 'em', '%' ],
524
+ 'range' => [
525
+ 'px'=> [
526
+ 'min' => 1,
527
+ 'max' => 170,
528
],
529
+ 'em'=> [
530
+ 'min' => 1,
531
+ 'max' => 30,
532
+ ]
533
+ ],
534
+ 'selectors' => [
535
+ '{{WRAPPER}} .premium-badge-right .corner span' => 'right: {{SIZE}}{{UNIT}}',
536
+ '{{WRAPPER}} .premium-badge-circle' => 'right: {{SIZE}}{{UNIT}}',
537
+ ],
538
+ 'condition' => [
539
+ 'ribbon_type!' => [ 'stripe', 'flag' ],
540
+ 'premium_pricing_table_badge_position' => 'right'
541
]
542
+ ]
543
+ );
544
545
+ $this->add_responsive_control('premium_pricing_table_badge_right_left',
546
+ [
547
+ 'label' => __('Horizontal Offset', 'premium-addons-for-elementor'),
548
+ 'type' => Controls_Manager::SLIDER,
549
+ 'size_units'=> [ 'px', 'em', '%' ],
550
+ 'range' => [
551
+ 'px'=> [
552
+ 'min' => 1,
553
+ 'max' => 170,
554
+ ],
555
+ 'em'=> [
556
+ 'min' => 1,
557
+ 'max' => 30,
558
+ ]
559
+ ],
560
+ 'selectors' => [
561
+ '{{WRAPPER}} .premium-badge-left .corner span' => 'left: {{SIZE}}{{UNIT}}',
562
+ '{{WRAPPER}} .premium-badge-circle' => 'left: {{SIZE}}{{UNIT}}',
563
+ ],
564
+ 'condition' => [
565
+ 'ribbon_type!' => [ 'stripe', 'flag' ],
566
+ 'premium_pricing_table_badge_position' => 'left'
567
+ ]
568
+ ]
569
+ );
570
571
+ $this->add_responsive_control('premium_pricing_table_badge_right_top',
572
+ [
573
+ 'label' => __('Vertical Offset', 'premium-addons-for-elementor'),
574
+ 'type' => Controls_Manager::SLIDER,
575
+ 'size_units'=> [ 'px', 'em', '%'],
576
+ 'range' => [
577
+ 'px'=> [
578
+ 'min' => 1,
579
+ 'max' => 200,
580
+ ],
581
+ 'em'=> [
582
+ 'min' => 1,
583
+ 'max' => 20,
584
]
585
+ ],
586
+ 'condition' => [
587
+ 'ribbon_type!' => 'stripe'
588
+ ],
589
+ 'selectors' => [
590
+ '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'top: {{SIZE}}{{UNIT}}',
591
+ '{{WRAPPER}} .premium-badge-circle , .premium-badge-flag .corner' => 'top: {{SIZE}}{{UNIT}}',
592
+ ],
593
+ ]
594
+ );
595
596
+ $this->end_controls_section();
597
+
598
+ $this->start_controls_section('premium_pricing_table_title',
599
+ [
600
+ 'label' => __('Display Options', 'premium-addons-for-elementor'),
601
+ ]
602
+ );
603
+
604
$this->add_control('premium_pricing_table_icon_switcher',
605
[
606
'label' => __('Icon', 'premium-addons-for-elementor'),
609
);
610
611
$this->add_control('premium_pricing_table_title_switcher',
612
+ [
613
+ 'label' => __('Title', 'premium-addons-for-elementor'),
614
+ 'type' => Controls_Manager::SWITCHER,
615
+ 'default' => 'yes',
616
+ ]
617
+ );
618
619
$this->add_control('premium_pricing_table_price_switcher',
620
+ [
621
+ 'label' => __('Price', 'premium-addons-for-elementor'),
622
+ 'type' => Controls_Manager::SWITCHER,
623
+ 'default' => 'yes',
624
+ ]
625
+ );
626
627
$this->add_control('premium_pricing_table_list_switcher',
628
+ [
629
+ 'label' => __('Features', 'premium-addons-for-elementor'),
630
+ 'type' => Controls_Manager::SWITCHER,
631
+ 'default' => 'yes',
632
+ ]
633
+ );
634
635
$this->add_control('premium_pricing_table_description_switcher',
636
+ [
637
+ 'label' => __('Description', 'premium-addons-for-elementor'),
638
+ 'type' => Controls_Manager::SWITCHER,
639
+ ]
640
+ );
641
642
$this->add_control('premium_pricing_table_button_switcher',
643
+ [
644
+ 'label' => __('Button', 'premium-addons-for-elementor'),
645
+ 'type' => Controls_Manager::SWITCHER,
646
+ 'default' => 'yes',
647
+ ]
648
+ );
649
650
$this->add_control('premium_pricing_table_badge_switcher',
651
+ [
652
+ 'label' => __('Ribbon', 'premium-addons-for-elementor'),
653
+ 'type' => Controls_Manager::SWITCHER,
654
+ 'default' => 'yes',
655
+ ]
656
+ );
657
658
$this->end_controls_section();
659
660
$this->start_controls_section('premium_pricing_icon_style_settings',
661
+ [
662
+ 'label' => __('Icon', 'premium-addons-for-elementor'),
663
+ 'tab' => Controls_Manager::TAB_STYLE,
664
+ 'condition' => [
665
+ 'premium_pricing_table_icon_switcher' => 'yes',
666
]
667
+ ]
668
+ );
669
670
$this->add_control('premium_pricing_icon_color',
671
+ [
672
+ 'label' => __('Color', 'premium-addons-for-elementor'),
673
+ 'type' => Controls_Manager::COLOR,
674
+ 'scheme' => [
675
+ 'type' => Scheme_Color::get_type(),
676
+ 'value' => Scheme_Color::COLOR_2,
677
+ ],
678
+ 'selectors' => [
679
+ '{{WRAPPER}} .premium-pricing-icon-container i' => 'color: {{VALUE}};'
680
+ ]
681
+ ]
682
+ );
683
+
684
$this->add_responsive_control('premium_pricing_icon_size',
685
+ [
686
+ 'label' => __('Size', 'premium-addons-for-elementor'),
687
+ 'type' => Controls_Manager::SLIDER,
688
+ 'default' => [
689
+ 'size' => 25,
690
+ ],
691
+ 'selectors' => [
692
+ '{{WRAPPER}} .premium-pricing-icon-container i' => 'font-size: {{SIZE}}px',
693
+ '{{WRAPPER}} .premium-pricing-icon-container svg' => 'width: {{SIZE}}px; height: {{SIZE}}px'
694
]
695
+ ]
696
+ );
697
698
$this->add_control('premium_pricing_icon_back_color',
699
+ [
700
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
701
+ 'type' => Controls_Manager::COLOR,
702
+ 'scheme' => [
703
+ 'type' => Scheme_Color::get_type(),
704
+ 'value' => Scheme_Color::COLOR_1,
705
+ ],
706
+ 'selectors' => [
707
+ '{{WRAPPER}} .premium-pricing-icon-container i' => 'background-color: {{VALUE}};'
708
+ ]
709
+ ]
710
+ );
711
712
$this->add_responsive_control('premium_pricing_icon_inner_padding',
713
+ [
714
+ 'label' => __('Padding', 'premium-addons-for-elementor'),
715
+ 'type' => Controls_Manager::SLIDER,
716
+ 'size_units' => ['px','em'],
717
+ 'default' => [
718
+ 'size' => 10,
719
+ 'unit' => 'px'
720
+ ],
721
+ 'selectors' => [
722
+ '{{WRAPPER}} .premium-pricing-icon-container i' => 'padding: {{SIZE}}{{UNIT}};',
723
]
724
+ ]
725
+ );
726
727
$this->add_group_control(
728
Group_Control_Border::get_type(),
729
+ [
730
+ 'name' => 'premium_pricing_icon_inner_border',
731
+ 'selector' => '{{WRAPPER}} .premium-pricing-icon-container i',
732
+ ]
733
+ );
734
735
$this->add_control('premium_pricing_icon_inner_radius',
736
+ [
737
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
738
+ 'type' => Controls_Manager::SLIDER,
739
+ 'size_units' => ['px', '%' , 'em'],
740
+ 'default' => [
741
+ 'size' => 100,
742
+ 'unit' => 'px'
743
+ ],
744
+ 'selectors' => [
745
+ '{{WRAPPER}} .premium-pricing-icon-container i' => 'border-radius: {{SIZE}}{{UNIT}};',
746
+ ],
747
+ 'separator' => 'after'
748
+ ]
749
+ );
750
751
$this->add_control('premium_pricing_icon_container_heading',
752
+ [
753
+ 'label' => __('Container', 'premium-addons-for-elementor'),
754
+ 'type' => Controls_Manager::HEADING,
755
+ ]
756
+ );
757
758
$this->add_group_control(
759
Group_Control_Background::get_type(),
760
+ [
761
+ 'name' => 'premium_pricing_table_icon_background',
762
+ 'types' => [ 'classic' , 'gradient' ],
763
+ 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
764
+ ]
765
+ );
766
767
$this->add_group_control(
768
Group_Control_Border::get_type(),
769
+ [
770
+ 'name' => 'premium_pricing_icon_border',
771
+ 'selector' => '{{WRAPPER}} .premium-pricing-icon-container',
772
+ ]
773
+ );
774
775
$this->add_control('premium_pricing_icon_border_radius',
776
+ [
777
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
778
+ 'type' => Controls_Manager::SLIDER,
779
+ 'size_units' => ['px', '%' ,'em'],
780
+ 'selectors' => [
781
+ '{{WRAPPER}} .premium-pricing-icon-container' => 'border-radius: {{SIZE}}{{UNIT}};'
782
]
783
+ ]
784
+ );
785
786
$this->add_responsive_control('premium_pricing_icon_margin',
787
+ [
788
+ 'label' => __('Margin', 'premium-addons-for-elementor'),
789
+ 'type' => Controls_Manager::DIMENSIONS,
790
+ 'size_units' => ['px', 'em', '%'],
791
+ 'default' => [
792
+ 'top' => 50,
793
+ 'right' => 0,
794
+ 'bottom'=> 20,
795
+ 'left' => 0,
796
+ 'unit' => 'px',
797
+ ],
798
+ 'selectors' => [
799
+ '{{WRAPPER}} .premium-pricing-icon-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
800
]
801
]
802
);
1736
1737
/*Button Border Radius*/
1738
$this->add_control('premium_pricing_table_button_border_radius_hover',
1739
+ [
1740
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1741
+ 'type' => Controls_Manager::SLIDER,
1742
+ 'size_units' => ['px', 'em' , '%' ],
1743
+ 'selectors' => [
1744
+ '{{WRAPPER}} .premium-pricing-price-button:hover' => 'border-radius: {{SIZE}}{{UNIT}};'
1745
]
1746
+ ]
1747
+ );
1748
1749
/*Button Shadow*/
1750
$this->add_group_control(
1751
Group_Control_Box_Shadow::get_type(),
1752
+ [
1753
+ 'label' => __('Shadow','premium-addons-for-elementor'),
1754
+ 'name' => 'premium_pricing_table_button_shadow_hover',
1755
+ 'selector' => '{{WRAPPER}} .premium-pricing-price-button:hover',
1756
+ ]
1757
+ );
1758
1759
/*Button Margin*/
1760
$this->add_responsive_control('premium_pricing_button_margin_hover',
1761
+ [
1762
+ 'label' => __('Margin', 'premium-addons-for-elementor'),
1763
+ 'type' => Controls_Manager::DIMENSIONS,
1764
+ 'size_units' => ['px', 'em', '%'],
1765
+ 'selectors' => [
1766
+ '{{WRAPPER}} .premium-pricing-price-button:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1767
+ ]
1768
+ ]
1769
+ );
1770
1771
$this->add_responsive_control('premium_pricing_button_padding_hover',
1772
[
1773
'label' => __('Padding', 'premium-addons-for-elementor'),
1788
1789
$this->end_controls_tab();
1790
1791
+ $this->end_controls_tabs();
1792
+
1793
+ $this->end_controls_section();
1794
1795
+ $this->start_controls_section('premium_pricing_table_badge_style',
1796
+ [
1797
+ 'label' => __('Ribbon', 'premium-addons-for-elementor'),
1798
+ 'tab' => Controls_Manager::TAB_STYLE,
1799
+ 'condition' => [
1800
+ 'premium_pricing_table_badge_switcher' => 'yes'
1801
+ ]
1802
+ ]
1803
+ );
1804
1805
+ $this->add_control('premium_pricing_badge_text_color',
1806
+ [
1807
+ 'label' => __('Text Color', 'premium-addons-for-elementor'),
1808
+ 'type' => Controls_Manager::COLOR,
1809
+ 'scheme' => [
1810
+ 'type' => Scheme_Color::get_type(),
1811
+ 'value' => Scheme_Color::COLOR_2,
1812
+ ],
1813
+ 'selectors' => [
1814
+ '{{WRAPPER}} .premium-pricing-badge-container .corner span' => 'color: {{VALUE}};'
1815
+ ]
1816
+ ]
1817
+ );
1818
+
1819
+ $this->add_group_control(
1820
+ Group_Control_Typography::get_type(),
1821
+ [
1822
+ 'name' => 'badge_text_typo',
1823
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1824
+ 'selector' => '{{WRAPPER}} .premium-pricing-badge-container .corner span',
1825
+ ]
1826
+ );
1827
1828
$this->add_control('premium_pricing_badge_left_color',
1829
+ [
1830
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
1831
+ 'type' => Controls_Manager::COLOR,
1832
+ 'scheme' => [
1833
+ 'type' => Scheme_Color::get_type(),
1834
+ 'value' => Scheme_Color::COLOR_1,
1835
+ ],
1836
+ 'selectors' => [
1837
+ '{{WRAPPER}} .premium-badge-left .corner' => 'border-top-color: {{VALUE}}',
1838
+ '{{WRAPPER}} .premium-badge-circle' => 'background-color: {{VALUE}}'
1839
+ ],
1840
+ 'condition' => [
1841
+ 'ribbon_type' => 'triangle',
1842
+ 'premium_pricing_table_badge_position' => 'left'
1843
+ ]
1844
+ ]
1845
+ );
1846
1847
$this->add_control('premium_pricing_badge_right_color',
1848
+ [
1849
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
1850
+ 'type' => Controls_Manager::COLOR,
1851
+ 'scheme' => [
1852
+ 'type' => Scheme_Color::get_type(),
1853
+ 'value' => Scheme_Color::COLOR_1,
1854
+ ],
1855
+ 'selectors' => [
1856
+ '{{WRAPPER}} .premium-badge-right .corner' => 'border-right-color: {{VALUE}};'
1857
+ ],
1858
+ 'condition' => [
1859
+ 'ribbon_type' => 'triangle',
1860
+ 'premium_pricing_table_badge_position' => 'left'
1861
+ ]
1862
+ ]
1863
+ );
1864
+
1865
+ $this->add_control('ribbon_background',
1866
+ [
1867
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
1868
+ 'type' => Controls_Manager::COLOR,
1869
+ 'scheme' => [
1870
+ 'type' => Scheme_Color::get_type(),
1871
+ 'value' => Scheme_Color::COLOR_1,
1872
+ ],
1873
+ 'selectors' => [
1874
+ '{{WRAPPER}} .premium-badge-circle, .premium-badge-stripe .corner, .premium-badge-flag .corner' => 'background-color: {{VALUE}}',
1875
+ '{{WRAPPER}} .premium-badge-flag .corner::before' => 'border-left: 8px solid {{VALUE}}'
1876
+ ],
1877
+ 'condition' => [
1878
+ 'ribbon_type!' => 'triangle'
1879
+ ]
1880
+ ]
1881
+ );
1882
+
1883
+ $this->add_group_control(
1884
+ Group_Control_Box_Shadow::get_type(),
1885
+ [
1886
+ 'name' => 'ribbon_shadow',
1887
+ 'selector' => '{{WRAPPER}} .premium-badge-circle, {{WRAPPER}} .premium-badge-stripe .corner, {{WRAPPER}} .premium-badge-flag .corner',
1888
+ 'condition' => [
1889
+ 'ribbon_type!' => 'triangle'
1890
+ ]
1891
+ ]
1892
+ );
1893
1894
$this->end_controls_section();
1895
1896
$this->start_controls_section('premium_pricing_box_style_settings',
1897
+ [
1898
+ 'label' => __('Box Settings', 'premium-addons-for-elementor'),
1899
+ 'tab' => Controls_Manager::TAB_STYLE,
1900
+ ]
1901
+ );
1902
1903
$this->start_controls_tabs('premium_pricing_table_box_style_tabs');
1904
1905
$this->start_controls_tab('premium_pricing_table_box_style_normal',
1906
+ [
1907
+ 'label' => __('Normal', 'premium-addons-for-elementor'),
1908
+ ]
1909
+ );
1910
1911
$this->add_group_control(
1912
Group_Control_Background::get_type(),
1913
+ [
1914
+ 'name' => 'premium_pricing_table_box_background',
1915
+ 'types' => [ 'classic' , 'gradient' ],
1916
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1917
+ ]
1918
+ );
1919
1920
$this->add_group_control(
1921
Group_Control_Border::get_type(),
1922
+ [
1923
+ 'name' => 'premium_pricing_table_box_border',
1924
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1925
+ ]
1926
+ );
1927
1928
$this->add_control('premium_pricing_table_box_border_radius',
1929
+ [
1930
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1931
+ 'type' => Controls_Manager::SLIDER,
1932
+ 'size_units' => ['px', '%' ,'em'],
1933
+ 'selectors' => [
1934
+ '{{WRAPPER}} .premium-pricing-table-container' => 'border-radius: {{SIZE}}{{UNIT}};'
1935
]
1936
+ ]
1937
+ );
1938
1939
$this->add_group_control(
1940
Group_Control_Box_Shadow::get_type(),
1941
+ [
1942
+ 'label' => __('Shadow','premium-addons-for-elementor'),
1943
+ 'name' => 'premium_pricing_table_box_shadow',
1944
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container',
1945
+ ]
1946
+ );
1947
1948
$this->add_responsive_control('premium_pricing_box_margin',
1949
+ [
1950
+ 'label' => __('Margin', 'premium-addons-for-elementor'),
1951
+ 'type' => Controls_Manager::DIMENSIONS,
1952
+ 'size_units' => ['px', 'em', '%'],
1953
+ 'selectors' => [
1954
+ '{{WRAPPER}} .premium-pricing-table-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1955
+ ]
1956
+ ]
1957
+ );
1958
1959
$this->add_responsive_control('premium_pricing_box_padding',
1960
+ [
1961
+ 'label' => __('Padding', 'premium-addons-for-elementor'),
1962
+ 'type' => Controls_Manager::DIMENSIONS,
1963
+ 'size_units' => ['px', 'em', '%'],
1964
+ 'default' => [
1965
+ 'top' => 40,
1966
+ 'right' => 0,
1967
+ 'bottom'=> 0,
1968
+ 'left' => 0,
1969
+ 'unit' => 'px',
1970
+ ],
1971
+ 'selectors' => [
1972
+ '{{WRAPPER}} .premium-pricing-table-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1973
+ ]
1974
+ ]
1975
+ );
1976
1977
$this->end_controls_tab();
1978
1979
$this->start_controls_tab('premium_pricing_table_box_style_hover',
1980
+ [
1981
+ 'label' => __('Hover', 'premium-addons-for-elementor'),
1982
]
1983
);
1984
1985
$this->add_group_control(
1986
Group_Control_Background::get_type(),
1987
+ [
1988
+ 'name' => 'premium_pricing_table_box_background_hover',
1989
+ 'types' => [ 'classic' , 'gradient' ],
1990
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
1991
+ ]
1992
+ );
1993
1994
$this->add_group_control(
1995
Group_Control_Border::get_type(),
1996
+ [
1997
+ 'name' => 'premium_pricing_table_box_border_hover',
1998
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
1999
+ ]
2000
+ );
2001
2002
$this->add_control('premium_pricing_table_box_border_radius_hover',
2003
+ [
2004
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
2005
+ 'type' => Controls_Manager::SLIDER,
2006
+ 'size_units' => ['px', 'em' , '%' ],
2007
+ 'selectors' => [
2008
+ '{{WRAPPER}} .premium-pricing-table-container:hover' => 'border-radius: {{SIZE}}{{UNIT}};'
2009
]
2010
+ ]
2011
+ );
2012
2013
$this->add_group_control(
2014
Group_Control_Box_Shadow::get_type(),
2015
+ [
2016
+ 'label' => __('Shadow','premium-addons-for-elementor'),
2017
+ 'name' => 'premium_pricing_table_box_shadow_hover',
2018
+ 'selector' => '{{WRAPPER}} .premium-pricing-table-container:hover',
2019
+ ]
2020
+ );
2021
2022
$this->add_responsive_control('premium_pricing_box_margin_hover',
2023
+ [
2024
+ 'label' => __('Margin', 'premium-addons-for-elementor'),
2025
+ 'type' => Controls_Manager::DIMENSIONS,
2026
+ 'size_units' => ['px', 'em', '%'],
2027
+ 'selectors' => [
2028
+ '{{WRAPPER}} .premium-pricing-table-container:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
2029
+ ]
2030
+ ]
2031
+ );
2032
2033
$this->add_responsive_control('premium_pricing_box_padding_hover',
2034
+ [
2035
+ 'label' => __('Padding', 'premium-addons-for-elementor'),
2036
+ 'type' => Controls_Manager::DIMENSIONS,
2037
+ 'size_units' => ['px', 'em', '%'],
2038
+ 'default' => [
2039
+ 'top' => 40,
2040
+ 'right' => 0,
2041
+ 'bottom'=> 0,
2042
+ 'left' => 0,
2043
+ 'unit' => 'px',
2044
+ ],
2045
+ 'selectors' => [
2046
+ '{{WRAPPER}} .premium-pricing-table-container:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
2047
+ ]
2048
+ ]
2049
+ );
2050
2051
$this->end_controls_tab();
2052
2053
$this->end_controls_tabs();
2054
2055
$this->end_controls_section();
2056
2057
2071
2072
$link_type = $settings['premium_pricing_table_button_url_type'];
2073
2074
+ if( 'yes' === $settings['premium_pricing_table_badge_switcher'] ) {
2075
+ $badge_position = 'premium-badge-' . $settings['premium_pricing_table_badge_position'];
2076
+
2077
+ $badge_style = 'premium-badge-' . $settings['ribbon_type'];
2078
+
2079
+ $this->add_inline_editing_attributes('premium_pricing_table_badge_text');
2080
+
2081
+ if( 'premium-badge-flag' === $badge_style )
2082
+ $badge_position = '';
2083
+ }
2084
2085
+ if( $link_type == 'link' ) {
2086
$link_url = get_permalink($settings['premium_pricing_table_button_link_existing_content']);
2087
+ } elseif ( $link_type == 'url' ) {
2088
$link_url = $settings['premium_pricing_table_button_link'];
2089
}
2090
2101
?>
2102
2103
<div class="premium-pricing-table-container">
2104
+ <?php if( 'yes' === $settings['premium_pricing_table_badge_switcher'] ) : ?>
2105
+ <div class="premium-pricing-badge-container <?php echo esc_attr( $badge_position . ' ' . $badge_style ); ?>">
2106
+ <div class="corner"><span <?php echo $this->get_render_attribute_string('premium_pricing_table_badge_text'); ?>><?php echo $settings['premium_pricing_table_badge_text']; ?></span></div>
2107
</div>
2108
<?php endif;
2109
if( $settings['premium_pricing_table_icon_switcher'] == 'yes' ) : ?>
2194
2195
var titleTag = settings.premium_pricing_table_title_size,
2196
linkType = settings.premium_pricing_table_button_url_type,
2197
linkURL = 'link' === linkType ? settings.premium_pricing_table_button_link_existing_content : settings.premium_pricing_table_button_link;
2198
+
2199
if( 'yes' === settings.premium_pricing_table_icon_switcher ) {
2200
var iconHTML = elementor.helpers.renderIcon( view, settings.premium_pricing_table_icon_selection_updated, { 'aria-hidden': true }, 'i' , 'object' ),
2201
migrated = elementor.helpers.isIconMigrated( settings, 'premium_pricing_table_icon_selection_updated' );
2202
}
2203
2204
+ if( 'yes' === settings.premium_pricing_table_badge_switcher ) {
2205
+ var badgePosition = 'premium-badge-' + settings.premium_pricing_table_badge_position,
2206
+ badgeStyle = 'premium-badge-' + settings.ribbon_type;
2207
+
2208
+ view.addInlineEditingAttributes('premium_pricing_table_badge_text');
2209
+
2210
+ if( 'premium-badge-flag' === badgeStyle )
2211
+ badgePosition = '';
2212
+
2213
+ }
2214
2215
#>
2216
2217
<div class="premium-pricing-table-container">
2218
<# if('yes' === settings.premium_pricing_table_badge_switcher ) { #>
2219
+ <div class="premium-pricing-badge-container {{ badgePosition }} {{ badgeStyle }}">
2220
+ <div class="corner"><span {{{ view.getRenderAttributeString('premium_pricing_table_badge_text') }}}>{{{ settings.premium_pricing_table_badge_text }}}</span></div>
2221
</div>
2222
<# } #>
2223
<# if( 'yes' === settings.premium_pricing_table_icon_switcher ) { #>