PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.1.0
Spider Elements – Premium Elementor Widgets & Addons Library v1.1.0
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / widgets / Pricing_Table_Switcher.php
spider-elements / widgets Last commit date
templates 2 years ago Accordion.php 2 years ago Alerts_Box.php 2 years ago Animated_Heading.php 2 years ago Before_after.php 2 years ago Blog_Grid.php 2 years ago Buttons.php 2 years ago Cheat_sheet.php 2 years ago Counter.php 2 years ago Fullscreen_Slider.php 2 years ago Icon_box.php 2 years ago Instagram.php 2 years ago Integrations.php 2 years ago List_Item.php 2 years ago Marquee_Slides.php 2 years ago Pricing_Table_Switcher.php 2 years ago Pricing_Table_Tabs.php 2 years ago Skill_Showcase.php 2 years ago Tabs.php 2 years ago Team_Carousel.php 2 years ago Testimonial.php 2 years ago Timeline.php 2 years ago Video_Playlist.php 2 years ago Video_Popup.php 2 years ago
Pricing_Table_Switcher.php
1361 lines
1 <?php
2
3 namespace SPEL\Widgets;
4
5 use Elementor\Repeater;
6 use Elementor\Widget_Base;
7 use Elementor\Controls_Manager;
8 use Elementor\Group_Control_Typography;
9 use Elementor\Group_Control_Border;
10 use Elementor\Group_Control_Box_Shadow;
11
12 // Exit if accessed directly
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Class Image_hover
19 */
20 class Pricing_Table_Switcher extends Widget_Base {
21 public function get_name() {
22 return 'landpagy_pricing_table_switcher'; // ID of the widget (Don't change this name)
23 }
24
25 public function get_title() {
26 return __( 'Pricing Table Switcher', 'spider-elements' );
27 }
28
29 public function get_icon() {
30 return 'eicon-price-table spel-icon';
31 }
32
33 public function get_keywords() {
34 return [ 'spider', 'spider elements', 'pricing', 'table', 'switcher' ];
35 }
36
37 public function get_categories() {
38 return [ 'spider-elements' ];
39 }
40
41 /**
42 * Name: get_style_depends()
43 * Desc: Register the required CSS dependencies for the frontend.
44 */
45 public function get_style_depends() {
46 return [ 'spel-main' ];
47 }
48
49
50 /**
51 * Name: register_controls()
52 * Desc: Register controls for these widgets
53 * Params: no params
54 * Return: @void
55 * Since: @1.0.0
56 * Package: @spider-elements
57 * Author: spider-themes
58 */
59 protected function register_controls() {
60 $this->elementor_content_control();
61 $this->elementor_style_control();
62 }
63
64
65 /**
66 * Name: elementor_content_control()
67 * Desc: Register content
68 * Params: no params
69 * Return: @void
70 * Since: @1.0.0
71 * Package: @spider-elements
72 * Author: spider-themes
73 */
74 public function elementor_content_control() {
75
76
77 //===================== Select Preset ===========================//
78 $this->start_controls_section(
79 'style_sec', [
80 'label' => esc_html__( 'Preset Skins', 'spider-elements' ),
81 ]
82 );
83
84 // $this->add_control(
85 // 'style', [
86 // 'label' => esc_html__( 'Style', 'spider-elements' ),
87 // 'type' => Controls_Manager::SELECT,
88 // 'options' => [
89 // '1' => esc_html__( '01: Button Switcher', 'spider-elements' ),
90 // '2' => esc_html__( '02: Tab Switcher', 'spider-elements' ),
91 // '3' => esc_html__( '03: Pricing Cloud', 'spider-elements' ),
92 // '4' => esc_html__( '04: Button Switcher', 'spider-elements' ),
93 // '5' => esc_html__( '05: Button Switcher', 'spider-elements' ),
94 // '6' => esc_html__( '06: Tab Switcher', 'spider-elements' ),
95 // '7' => esc_html__( '07: Button Switcher', 'spider-elements' ),
96 // ],
97 // 'default' => '1',
98 // ]
99 // );
100
101 $this->add_control(
102 'style', [
103 'label' => esc_html__( 'Pricing Style', 'spider-elements' ),
104 'type' => Controls_Manager::CHOOSE,
105 'options' => [
106 '1' => [
107 'icon' => 'pricing_style1',
108 'title' => esc_html__( '01 : Button Switcher', 'spider-elements' )
109 ],
110 '2' => [
111 'icon' => 'pricing_style2',
112 'title' => esc_html__( '02 : Tab Switcher', 'spider-elements' ),
113 ],
114 '3' => [
115 'icon' => 'pricing_style3',
116 'title' => esc_html__( '03 : Pricing Cloud', 'spider-elements' ),
117 ],
118 '4' => [
119 'icon' => 'pricing_style4',
120 'title' => esc_html__( '04 : Button Switcher', 'spider-elements' ),
121 ],
122 '5' => [
123 'icon' => 'pricing_style5',
124 'title' => esc_html__( '05 : Button Switcher', 'spider-elements' ),
125 ],
126 '6' => [
127 'icon' => 'pricing_style6',
128 'title' => esc_html__( '06 : Tab Switcher', 'spider-elements' ),
129 ],
130 '7' => [
131 'icon' => 'pricing_style7',
132 'title' => esc_html__( '07 : Button Switcher', 'spider-elements' ),
133 ],
134 ],
135 'default' => '1',
136 ]
137 );
138
139 $this->end_controls_section(); //End Select Style
140
141
142 //============================ Pricing Table Tab 01 ==================================//
143 $this->start_controls_section(
144 'pricing_table_tab1_sec', [
145 'label' => esc_html__( 'Tab 01', 'spider-elements' ),
146 'condition' => [
147 'style' => [ '1', '2', '3', '4', '5' ]
148 ]
149 ]
150 );
151
152 $this->add_control(
153 'tab1_title', [
154 'label' => esc_html__( 'Title', 'spider-elements' ),
155 'type' => Controls_Manager::TEXT,
156 'label_block' => true,
157 'default' => 'Monthly',
158 ]
159 );
160
161 //===== Table 01
162 $tab_1 = new Repeater();
163 $tab_1->add_control(
164 'table_icon', [
165 'label' => esc_html__( 'Icon', 'spider-elements' ),
166 'type' => Controls_Manager::MEDIA,
167 ]
168 );
169
170 $tab_1->add_control(
171 'title', [
172 'label' => esc_html__( 'Title', 'spider-elements' ),
173 'type' => Controls_Manager::TEXT,
174 'default' => esc_html__( 'STARTER', 'spider-elements' ),
175 'label_block' => true,
176 ]
177 );
178
179 $tab_1->add_control(
180 'subtitle', [
181 'label' => esc_html__( 'Description', 'spider-elements' ),
182 'type' => Controls_Manager::TEXT,
183 ]
184 );
185
186 $tab_1->add_control(
187 'price', [
188 'label' => esc_html__( 'Price', 'spider-elements' ),
189 'type' => Controls_Manager::TEXT,
190 'default' => '$18.99',
191 'label_block' => true,
192 ]
193 );
194
195 $tab_1->add_control(
196 'contents', [
197 'label' => esc_html__( 'Content', 'spider-elements' ),
198 'type' => Controls_Manager::TEXTAREA,
199 'label_block' => true,
200 ]
201 );
202
203 $tab_1->add_control(
204 'btn_label', [
205 'label' => esc_html__( 'Button label', 'spider-elements' ),
206 'type' => Controls_Manager::TEXT,
207 'default' => esc_html__( 'Buy Plan', 'spider-elements' ),
208 'label_block' => true,
209 ]
210 );
211
212 $tab_1->add_control(
213 'btn_url', [
214 'label' => esc_html__( 'Button URL', 'spider-elements' ),
215 'type' => Controls_Manager::URL,
216 'default' => [
217 'url' => '#'
218 ],
219 ]
220 );
221
222 $this->add_control(
223 'pricing_table_1', [
224 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
225 'type' => Controls_Manager::REPEATER,
226 'fields' => $tab_1->get_controls(),
227 'title_field' => '{{{ title }}}',
228 'prevent_empty' => false,
229 'condition' => [
230 'style' => '1'
231 ],
232 'separator' => 'before'
233 ]
234 ); //End Table Style 01
235
236
237 //===== Table Style 02
238 $tab_2 = new Repeater();
239 $tab_2->add_control(
240 'title', [
241 'label' => esc_html__( 'Title', 'spider-elements' ),
242 'type' => Controls_Manager::TEXT,
243 'default' => esc_html__( 'Free', 'spider-elements' ),
244 'label_block' => true,
245 ]
246 );
247
248 $tab_2->add_control(
249 'price', [
250 'label' => esc_html__( 'Price', 'spider-elements' ),
251 'type' => Controls_Manager::TEXT,
252 'default' => esc_html__( '$18.99', 'spider-elements' ),
253 ]
254 );
255
256 $tab_2->add_control(
257 'duration', [
258 'label' => esc_html__( 'Duration', 'spider-elements' ),
259 'type' => Controls_Manager::TEXT,
260 'default' => esc_html__( 'm', 'spider-elements' ),
261 ]
262 );
263
264 $tab_2->add_control(
265 'contents', [
266 'label' => esc_html__( 'Contents', 'spider-elements' ),
267 'type' => Controls_Manager::WYSIWYG,
268 ]
269 );
270
271 $tab_2->add_control(
272 'btn_label', [
273 'label' => esc_html__( 'Button label', 'spider-elements' ),
274 'type' => Controls_Manager::TEXT,
275 'default' => esc_html__( 'Buy Plan', 'spider-elements' ),
276 'label_block' => true,
277 'separator' => 'before',
278 ]
279 );
280
281 $tab_2->add_control(
282 'btn_url', [
283 'label' => esc_html__( 'Button URL', 'spider-elements' ),
284 'type' => Controls_Manager::URL,
285 'default' => [
286 'url' => '#'
287 ],
288 ]
289 );
290
291 $this->add_control(
292 'pricing_table_3', [
293 'label' => esc_html__( 'Tab 02 List', 'spider-elements' ),
294 'type' => Controls_Manager::REPEATER,
295 'fields' => $tab_2->get_controls(),
296 'title_field' => '{{{ title }}}',
297 'prevent_empty' => false,
298 'condition' => [
299 'style' => '2'
300 ],
301 'separator' => 'before'
302 ]
303 ); //End Table Style 02
304
305
306 //===== Table 03
307 $tab_3 = new Repeater();
308 $tab_3->add_control(
309 'is_favorite', [
310 'label' => __( 'Is Favorite', 'spider-elements' ),
311 'type' => Controls_Manager::SWITCHER,
312 'label_on' => __( 'Show', 'spider-elements' ),
313 'label_off' => __( 'Hide', 'spider-elements' ),
314 'return_value' => 'yes',
315 'default' => 'no',
316 'separator' => 'after'
317 ]
318 );
319
320 $tab_3->add_control(
321 'title', [
322 'label' => esc_html__( 'Title', 'spider-elements' ),
323 'type' => Controls_Manager::TEXT,
324 'default' => 'Included',
325 ]
326 );
327
328 $tab_3->add_control(
329 'subtitle', [
330 'label' => esc_html__( 'Subtitle', 'spider-elements' ),
331 'type' => Controls_Manager::TEXT,
332 'default' => '10GB',
333 ]
334 );
335
336 $tab_3->add_control(
337 'contents', [
338 'label' => esc_html__( 'Content', 'spider-elements' ),
339 'type' => Controls_Manager::TEXTAREA,
340 ]
341 );
342
343 $tab_3->add_control(
344 'price', [
345 'label' => esc_html__( 'Price', 'spider-elements' ),
346 'type' => Controls_Manager::TEXT,
347 'default' => '$18.99',
348 ]
349 );
350
351 $tab_3->add_control(
352 'btn_label', [
353 'label' => esc_html__( 'Button label', 'spider-elements' ),
354 'type' => Controls_Manager::TEXT,
355 'default' => 'Purchase',
356 'label_block' => true,
357 ]
358 );
359
360 $tab_3->add_control(
361 'btn_url', [
362 'label' => esc_html__( 'Button URL', 'spider-elements' ),
363 'type' => Controls_Manager::URL,
364 'default' => [
365 'url' => '#'
366 ],
367 ]
368 );
369
370 $this->add_control(
371 'pricing_table_5', [
372 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
373 'type' => Controls_Manager::REPEATER,
374 'fields' => $tab_3->get_controls(),
375 'title_field' => '{{{ title }}}',
376 'prevent_empty' => false,
377 'condition' => [
378 'style' => '3'
379 ],
380 ]
381 ); //End Table Style 03
382
383
384 //===== Table 04
385 $tab_4 = new Repeater();
386 $tab_4->add_control(
387 'title', [
388 'label' => esc_html__( 'Title 1', 'spider-elements' ),
389 'type' => Controls_Manager::TEXT,
390 'default' => 'The Basics',
391 ]
392 );
393
394 $tab_4->add_control(
395 'subtitle', [
396 'label' => esc_html__( 'Subtitle', 'spider-elements' ),
397 'type' => Controls_Manager::TEXT,
398 'default' => 'Free for 7 days then',
399 ]
400 );
401
402 $tab_4->add_control(
403 'price', [
404 'label' => esc_html__( 'Price', 'spider-elements' ),
405 'type' => Controls_Manager::TEXT,
406 'default' => '$18.99',
407 ]
408 );
409
410 $tab_4->add_control(
411 'duration', [
412 'label' => esc_html__( 'Duration', 'spider-elements' ),
413 'type' => Controls_Manager::TEXT,
414 'default' => '/ Month',
415 ]
416 );
417
418 $tab_4->add_control(
419 'contents', [
420 'label' => esc_html__( 'Content', 'spider-elements' ),
421 'type' => Controls_Manager::WYSIWYG,
422 ]
423 );
424
425 $tab_4->add_control(
426 'btn_label', [
427 'label' => esc_html__( 'Button label', 'spider-elements' ),
428 'type' => Controls_Manager::TEXT,
429 'default' => 'Start Free Trial',
430 'label_block' => true,
431 ]
432 );
433
434 $tab_4->add_control(
435 'btn_url', [
436 'label' => esc_html__( 'Button URL', 'spider-elements' ),
437 'type' => Controls_Manager::URL,
438 'default' => [
439 'url' => '#'
440 ],
441 ]
442 );
443
444 $this->add_control(
445 'pricing_table_7', [
446 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
447 'type' => Controls_Manager::REPEATER,
448 'fields' => $tab_4->get_controls(),
449 'title_field' => '{{{ title }}}',
450 'prevent_empty' => false,
451 'condition' => [
452 'style' => '4'
453 ],
454 ]
455 ); //End Table Style 04
456
457
458 //===== Table 05
459 $tab_5 = new Repeater();
460 $tab_5->add_control(
461 'title', [
462 'label' => esc_html__( 'Title', 'spider-elements' ),
463 'type' => Controls_Manager::TEXT,
464 'default' => 'Starter',
465 ]
466 );
467
468 $tab_5->add_control(
469 'price', [
470 'label' => esc_html__( 'Price', 'spider-elements' ),
471 'type' => Controls_Manager::TEXT,
472 'default' => '15 USD',
473 ]
474 );
475
476 $tab_5->add_control(
477 'duration', [
478 'label' => esc_html__( 'Duration', 'spider-elements' ),
479 'type' => Controls_Manager::TEXT,
480 'default' => '/ mo',
481 ]
482 );
483
484 $tab_5->add_control(
485 'f_title', [
486 'label' => esc_html__( 'Features Title', 'spider-elements' ),
487 'type' => Controls_Manager::TEXT,
488 'default' => 'Includes:',
489 ]
490 );
491
492 $tab_5->add_control(
493 'contents', [
494 'label' => esc_html__( 'Content', 'spider-elements' ),
495 'type' => Controls_Manager::WYSIWYG,
496 ]
497 );
498
499 $tab_5->add_control(
500 'btn_label', [
501 'label' => esc_html__( 'Button label', 'spider-elements' ),
502 'type' => Controls_Manager::TEXT,
503 'default' => 'Purchase',
504 'label_block' => true,
505 ]
506 );
507
508 $tab_5->add_control(
509 'btn_url', [
510 'label' => esc_html__( 'Button URL', 'spider-elements' ),
511 'type' => Controls_Manager::URL,
512 'default' => [
513 'url' => '#'
514 ],
515 ]
516 );
517
518 $this->add_control(
519 'pricing_table_9', [
520 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
521 'type' => Controls_Manager::REPEATER,
522 'fields' => $tab_5->get_controls(),
523 'title_field' => '{{{ title }}}',
524 'prevent_empty' => false,
525 'condition' => [
526 'style' => '5'
527 ],
528 ]
529 ); //End Table Style 05
530
531 $this->end_controls_section(); //End Pricing Table Tabs
532
533
534 //=========================== Pricing Table Tab 02 =============================//
535 $this->start_controls_section(
536 'pricing_table_tab2_sec', [
537 'label' => esc_html__( 'Tab 02', 'spider-elements' ),
538 'condition' => [
539 'style' => [ '1', '2', '3', '4', '5' ]
540 ],
541 ]
542 );
543
544 $this->add_control(
545 'tab2_title', [
546 'label' => esc_html__( 'Title', 'spider-elements' ),
547 'type' => Controls_Manager::TEXT,
548 'label_block' => true,
549 'default' => 'Yearly',
550 ]
551 );
552
553 //====== Table Style 01
554 $this->add_control(
555 'pricing_table_2', [
556 'label' => esc_html__( 'Tab 02 List', 'spider-elements' ),
557 'type' => Controls_Manager::REPEATER,
558 'fields' => $tab_1->get_controls(),
559 'title_field' => '{{{ title }}}',
560 'prevent_empty' => false,
561 'condition' => [
562 'style' => '1'
563 ],
564 ]
565 );
566
567 //====== Table Style 02
568 $this->add_control(
569 'pricing_table_4', [
570 'label' => esc_html__( 'Tab 02 List', 'spider-elements' ),
571 'type' => Controls_Manager::REPEATER,
572 'fields' => $tab_2->get_controls(),
573 'title_field' => '{{{ title }}}',
574 'prevent_empty' => false,
575 'condition' => [
576 'style' => '2'
577 ],
578 ]
579 );
580
581 //====== Table Style 03
582 $this->add_control(
583 'pricing_table_6', [
584 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
585 'type' => Controls_Manager::REPEATER,
586 'fields' => $tab_3->get_controls(),
587 'title_field' => '{{{ title }}}',
588 'prevent_empty' => false,
589 'condition' => [
590 'style' => '3'
591 ],
592 ]
593 );
594
595 //======== Table Style 04
596 $this->add_control(
597 'pricing_table_8', [
598 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
599 'type' => Controls_Manager::REPEATER,
600 'fields' => $tab_4->get_controls(),
601 'title_field' => '{{{ title }}}',
602 'prevent_empty' => false,
603 'condition' => [
604 'style' => '4'
605 ],
606 ]
607 );
608
609
610 //========== Table Style 05
611 $this->add_control(
612 'pricing_table_10', [
613 'label' => esc_html__( 'Tab 01 List', 'spider-elements' ),
614 'type' => Controls_Manager::REPEATER,
615 'fields' => $tab_5->get_controls(),
616 'title_field' => '{{{ title }}}',
617 'prevent_empty' => false,
618 'condition' => [
619 'style' => '5'
620 ],
621 ]
622 );
623
624 $this->end_controls_section(); //End Pricing Table Tab 02
625
626
627 //========================== Table Style 06, 07 ============================//
628 $this->start_controls_section(
629 'pricing_table_sec', [
630 'label' => esc_html__( 'Pricing Table', 'spider-elements' ),
631 'condition' => [
632 'style' => [ '6', '7' ]
633 ]
634 ]
635 );
636
637 $this->start_controls_tabs(
638 'pricing_table_tabs'
639 );
640
641 //==== Monthly Tabs
642 $this->start_controls_tab(
643 'monthly_tab', [
644 'label' => esc_html__( 'Tab 01', 'spider-elements' ),
645 ]
646 );
647
648 $this->add_control(
649 'tab1_title2', [
650 'label' => esc_html__( 'Tab Title 2', 'spider-elements' ),
651 'type' => Controls_Manager::TEXT,
652 'default' => 'Monthly',
653 'separator' => 'after'
654 ]
655 );
656
657 $this->add_control(
658 'tab1_old_price', [
659 'label' => esc_html__( 'Old Price', 'spider-elements' ),
660 'type' => Controls_Manager::TEXT,
661 'default' => '99.99',
662 ]
663 );
664
665 $this->add_control(
666 'tab1_current_price', [
667 'label' => esc_html__( 'Current Price', 'spider-elements' ),
668 'type' => Controls_Manager::TEXT,
669 'default' => '79.49',
670 ]
671 );
672
673 $this->add_control(
674 'tab1_discount_price', [
675 'label' => esc_html__( 'Discount Price', 'spider-elements' ),
676 'type' => Controls_Manager::TEXT,
677 'default' => '$45.25% OFF',
678 ]
679 );
680
681 $this->add_control(
682 'tab1_duration', [
683 'label' => esc_html__( 'Duration', 'spider-elements' ),
684 'type' => Controls_Manager::TEXT,
685 'default' => ' /month',
686 ]
687 );
688
689 $this->add_control(
690 'tab1_bottom_content', [
691 'label' => esc_html__( 'Contents', 'spider-elements' ),
692 'type' => Controls_Manager::TEXT,
693 'default' => 'for the first month',
694 'label_block' => true,
695 ]
696 );
697
698 $this->end_controls_tab();
699
700 //==== Yearly Tabs
701 $this->start_controls_tab(
702 'yearly_tab', [
703 'label' => esc_html__( 'Tab 02', 'spider-elements' ),
704 ]
705 );
706
707 $this->add_control(
708 'tab2_title2', [
709 'label' => esc_html__( 'Tab Title', 'spider-elements' ),
710 'type' => Controls_Manager::TEXT,
711 'default' => 'Annual',
712 ]
713 );
714
715 $this->add_control(
716 'tab2_old_price', [
717 'label' => esc_html__( 'Old Price', 'spider-elements' ),
718 'type' => Controls_Manager::TEXT,
719 'default' => '99.99',
720 ]
721 );
722
723 $this->add_control(
724 'tab2_current_price', [
725 'label' => esc_html__( 'Current Price', 'spider-elements' ),
726 'type' => Controls_Manager::TEXT,
727 'default' => '79.49',
728 ]
729 );
730
731 $this->add_control(
732 'tab2_discount_price', [
733 'label' => esc_html__( 'Discount Price', 'spider-elements' ),
734 'type' => Controls_Manager::TEXT,
735 'default' => '$45.25% OFF',
736 ]
737 );
738
739 $this->add_control(
740 'tab2_duration', [
741 'label' => esc_html__( 'Duration', 'spider-elements' ),
742 'type' => Controls_Manager::TEXT,
743 'default' => ' /year',
744 ]
745 );
746
747 $this->add_control(
748 'tab2_bottom_content', [
749 'label' => esc_html__( 'Contents', 'spider-elements' ),
750 'type' => Controls_Manager::TEXT,
751 'default' => 'for the first year',
752 'label_block' => true,
753 ]
754 );
755
756 $this->end_controls_tab();
757
758 $this->end_controls_tabs(); //End Tabs
759
760 $this->end_controls_section(); //End Table Style 06
761
762
763 //========================== Column Grid ============================//
764 $this->start_controls_section(
765 'column_grid_sec', [
766 'label' => esc_html__( 'Column Grid', 'spider-elements' ),
767 'condition' => [
768 'style' => [ '1', '2', '3', '4', '5', '6' ]
769 ]
770 ]
771 );
772
773 $this->add_control(
774 'column', [
775 'label' => esc_html__( 'Column', 'spider-elements' ),
776 'type' => Controls_Manager::SELECT,
777 'options' => [
778 '6' => esc_html__( 'Two', 'spider-elements' ),
779 '4' => esc_html__( 'Three', 'spider-elements' ),
780 '3' => esc_html__( 'Four', 'spider-elements' ),
781 ],
782 'default' => '4',
783 ]
784 );
785
786 $this->add_responsive_control(
787 'pricing_column_gap',
788 [
789 'label' => esc_html__( 'Gap', 'spider-elements' ),
790 'type' => Controls_Manager::SLIDER,
791 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
792 'range' => [
793 'px' => [
794 'max' => 100,
795 ],
796 'em' => [
797 'max' => 0,
798 ],
799 ],
800 'selectors' => [
801 '{{WRAPPER}} .pricing-item-two-cotnainer' => 'gap: {{SIZE}}{{UNIT}};',
802 ],
803 ]
804 );
805
806 $this->end_controls_section(); //End Column Grid
807
808 }
809
810
811 /**
812 * Name: elementor_style_control()
813 * Desc: Register style content
814 * Params: no params
815 * Return: @void
816 * Since: @1.0.0
817 * Package: @spider-elements
818 * Author: spider-themes
819 */
820 public function elementor_style_control() {
821
822
823 //=============================== Start Switcher Title ===================================//
824 $this->start_controls_section(
825 'switcher_title_style', [
826 'label' => esc_html__( 'Switcher Title', 'spider-elements' ),
827 'tab' => Controls_Manager::TAB_STYLE,
828 'condition' => [
829 'style' => [ '1', '3', '4', '5', '7' ]
830 ],
831 ]
832 );
833
834
835 // Start Title Normal/Active State
836 $this->start_controls_tabs(
837 'style_title_tabs'
838 );
839
840 // Normal Tab Title
841 $this->start_controls_tab(
842 'style_title_normal',
843 [
844 'label' => __( 'Normal', 'spider-elements' ),
845 ]
846 );
847
848 $this->add_control(
849 'normal_title_text_color',
850 [
851 'label' => __( 'Text Color', 'spider-elements' ),
852 'type' => Controls_Manager::COLOR,
853 'selectors' => array(
854 '{{WRAPPER}} .spe_pricing_title' => 'color: {{VALUE}};',
855 )
856 ]
857 );
858
859 $this->add_control(
860 'normal_title_border',
861 [
862 'label' => __( 'Border Color', 'spider-elements' ),
863 'type' => Controls_Manager::COLOR,
864 'condition' => [
865 'style' => '4'
866 ],
867 'selector' => array(
868 '{{WRAPPER}} .spe_pricing_title' => 'color: {{VALUE}}',
869 )
870 ]
871 );
872
873 $this->end_controls_tab(); //End Normal Tab Title
874
875
876 //=== Active Tab Title
877 $this->start_controls_tab(
878 'style_tab_title_active',
879 [
880 'label' => __( 'Active', 'spider-elements' ),
881 ]
882 );
883
884 $this->add_control(
885 'active_title_text_color',
886 [
887 'label' => __( 'Text Color', 'spider-elements' ),
888 'type' => Controls_Manager::COLOR,
889 'selectors' => [
890 '{{WRAPPER}} .spe_pricing_title.active' => 'color: {{VALUE}};',
891 ]
892 ]
893 );
894
895 $this->add_control(
896 'active_title_border',
897 [
898 'label' => __( 'Border Color', 'spider-elements' ),
899 'type' => Controls_Manager::COLOR,
900 'condition' => [
901 'style' => '4'
902 ],
903 'selector' => array(
904 '{{WRAPPER}} .spe_pricing_title.active' => 'color: {{VALUE}}',
905 )
906 ]
907 );
908
909 $this->end_controls_tabs(); // End Active Tab Title
910 $this->end_controls_tab(); // End Title Normal/Active State
911
912 $this->end_controls_section(); //End Switcher Title
913
914
915 //=============================== Pricing Content ===================================//
916
917 // star pricing content section
918 $this->start_controls_section(
919 'pricing_table_contents',
920 [
921 'label' => esc_html__( 'Pricing Table Style', 'spider-elements' ),
922 'tab' => Controls_Manager::TAB_STYLE,
923 ]
924 );
925
926 $this->add_control(
927 'pricing_item_bg',
928 [
929 'label' => esc_html__( 'Background Color', 'spider-elements' ),
930 'type' => Controls_Manager::COLOR,
931 'default' => '',
932 'selectors' => [
933 '{{WRAPPER}} .spe_pricing_item_wrapper' => 'background-color: {{VALUE}};',
934 ],
935 ]
936 );
937
938 $this->add_responsive_control(
939 'pricing_item_padding',
940 [
941 'label' => esc_html__( 'Padding', 'spider-elements' ),
942 'type' => Controls_Manager::DIMENSIONS,
943 'size_units' => [ 'px', 'em', '%' ],
944 'selectors' => [
945 '{{WRAPPER}} .spe_pricing_item_wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
946 ],
947 ]
948 );
949
950 $this->add_responsive_control(
951 'pricing_item_margin',
952 [
953 'label' => esc_html__( 'Margin', 'spider-elements' ),
954 'type' => Controls_Manager::DIMENSIONS,
955 'size_units' => [ 'px', 'em', '%' ],
956 'selectors' => [
957 '{{WRAPPER}} .spe_pricing_item_wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
958 ],
959 ]
960 );
961
962 $this->add_group_control(
963 Group_Control_Border::get_type(),
964 [
965 'name' => 'pricing_item_border',
966 'label' => esc_html__( 'Border Type', 'spider-elements' ),
967 'selector' => '{{WRAPPER}} .spe_pricing_item_wrapper',
968 ]
969 );
970
971 $this->add_control(
972 'pricing_item_border_radius',
973 [
974 'label' => esc_html__( 'Border Radius', 'spider-elements' ),
975 'type' => Controls_Manager::SLIDER,
976 'default' => [
977 'size' => 4,
978 ],
979 'range' => [
980 'px' => [
981 'max' => 50,
982 ],
983 ],
984 'selectors' => [
985 '{{WRAPPER}}' => 'border-radius: {{SIZE}}px;',
986 '{{WRAPPER}} .spe_pricing_item_wrapper' => 'border-radius: {{SIZE}}px;',
987 ],
988 ]
989 );
990
991 $this->add_group_control(
992 Group_Control_Box_Shadow::get_type(),
993 [
994 'name' => 'pricing_item_boxShadow',
995 'selectors' => [
996 '{{WRAPPER}} .spe_pricing_item_wrapper',
997 ],
998 ]
999 );
1000
1001 $this->end_controls_section(); //End pricing Content Section
1002
1003
1004 // Start Header Style
1005 $this->start_controls_section(
1006 'pricing_table_contents_heading',
1007 [
1008 'label' => esc_html__( 'Header', 'spider-elements' ),
1009 'tab' => Controls_Manager::TAB_STYLE,
1010 ]
1011 );
1012
1013 $this->add_control(
1014 'pricing_table_contents_heading_title',
1015 [
1016 'label' => esc_html__( 'Title Style', 'spider-elements' ),
1017 'type' => Controls_Manager::HEADING,
1018 ]
1019 );
1020
1021 $this->add_control(
1022 'pricing_table_contents_heading_color',
1023 [
1024 'label' => esc_html__( 'Color', 'spider-elements' ),
1025 'type' => Controls_Manager::COLOR,
1026 'default' => '',
1027 'selectors' => [
1028 '{{WRAPPER}} .spe_pricing_item_header' => 'color: {{VALUE}};',
1029 ],
1030 ]
1031 );
1032
1033 $this->add_group_control(
1034 Group_Control_Typography::get_type(),
1035 [
1036 'name' => 'pricing_table_contents_heading_typo',
1037 'selector' => '{{WRAPPER}} .spe_pricing_item_header',
1038 ]
1039
1040 );
1041
1042 $this->add_control(
1043 'pricing_item_contents_color',
1044 [
1045 'label' => esc_html__( 'Content Color', 'spider-elements' ),
1046 'type' => Controls_Manager::COLOR,
1047 'separator' => 'before',
1048 'default' => '',
1049 'selectors' => [
1050 '{{WRAPPER}} .spe_pricing_item_content' => 'color: {{VALUE}};',
1051 ],
1052 ]
1053 );
1054
1055 $this->add_group_control(
1056 Group_Control_Typography::get_type(),
1057 [
1058 'name' => 'pricing_item_contents_typo',
1059 'label' => 'Content Typography',
1060 'selector' => '{{WRAPPER}} .spe_pricing_item_content',
1061 ]
1062
1063 );
1064
1065 $this->end_controls_section(); // End Header Style
1066
1067
1068 // Star Pricing Style
1069 $this->start_controls_section(
1070 'pricing_table_contents_price',
1071 [
1072 'label' => esc_html__( 'Pricing', 'spider-elements' ),
1073 'tab' => Controls_Manager::TAB_STYLE,
1074 ]
1075 );
1076
1077 $this->add_control(
1078 'pricing_table_contents_style',
1079 [
1080 'label' => esc_html__( 'Title Style', 'spider-elements' ),
1081 'type' => Controls_Manager::HEADING,
1082 ]
1083 );
1084
1085 $this->add_control(
1086 'pricing_table_contents_price_color',
1087 [
1088 'label' => esc_html__( 'Color', 'spider-elements' ),
1089 'type' => Controls_Manager::COLOR,
1090 'default' => '',
1091 'selectors' => [
1092 '{{WRAPPER}} .spe_price' => 'color: {{VALUE}};',
1093 ],
1094 ]
1095 );
1096
1097 $this->add_group_control(
1098 Group_Control_Typography::get_type(),
1099 [
1100 'name' => 'pricing_table_contents_price_typo',
1101 'selector' => '{{WRAPPER}} .spe_price',
1102 ]
1103
1104 );
1105
1106 $this->add_control(
1107 'pricing_table_contents_duration_color',
1108 [
1109 'label' => esc_html__( 'Duration Color', 'spider-elements' ),
1110 'type' => Controls_Manager::COLOR,
1111 'condition' => [
1112 'style' => [ '2', '4' ]
1113 ],
1114 'default' => '',
1115 'selectors' => [
1116 '{{WRAPPER}} .pricing-item-3 .price span, .app-pricing-item .item-price .time' => 'color: {{VALUE}};',
1117 ],
1118 'separator' => 'before',
1119 ]
1120 );
1121
1122 $this->add_group_control(
1123 Group_Control_Typography::get_type(),
1124 [
1125 'name' => 'pricing_table_contents_duration_typo',
1126 'label' => 'Duration Typography',
1127 'selector' => '{{WRAPPER}} .pricing-item-3 .price span, .app-pricing-item .item-price .time',
1128 'condition' => [
1129 'style' => [ '2', '4' ]
1130 ],
1131 ]
1132
1133 );
1134
1135 $this->end_controls_section(); //End Pricing style
1136
1137 // Start Button Style
1138
1139 $this->start_controls_section(
1140 'pricing_table_contents_btn_style',
1141 [
1142 'label' => esc_html__( 'Button', 'spider-elements' ),
1143 'tab' => Controls_Manager::TAB_STYLE,
1144 ]
1145 );
1146
1147 $this->add_responsive_control(
1148 'pricing_table_contents_btn_padding',
1149 [
1150 'label' => esc_html__( 'Padding', 'spider-elements' ),
1151 'type' => Controls_Manager::DIMENSIONS,
1152 'size_units' => [ 'px', 'em', '%' ],
1153 'selectors' => [
1154 '{{WRAPPER}} .spe_pricing_item_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1155 ],
1156 ]
1157 );
1158
1159 $this->add_responsive_control(
1160 'pricing_table_contents_btn_margin',
1161 [
1162 'label' => esc_html__( 'Margin', 'spider-elements' ),
1163 'type' => Controls_Manager::DIMENSIONS,
1164 'size_units' => [ 'px', 'em', '%' ],
1165 'selectors' => [
1166 '{{WRAPPER}} .spe_pricing_item_btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1167 ],
1168 ]
1169 );
1170
1171
1172 $this->add_group_control(
1173 Group_Control_Typography::get_type(),
1174 [
1175 'name' => 'pricing_table_contents_btn_typo',
1176 'selector' => '{{WRAPPER}} .spe_pricing_item_btn',
1177 ]
1178 );
1179
1180
1181 $this->start_controls_tabs( 'pricing_table_contents_btn_tabs' );
1182
1183 // Normal State Tab
1184 $this->start_controls_tab( 'pricing_table_contents_btn_tabs_normal', [ 'label' => esc_html__( 'Normal', 'spider-elements' ) ] );
1185
1186 $this->add_control(
1187 'pricing_contents_btn_normal_color',
1188 [
1189 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1190 'type' => Controls_Manager::COLOR,
1191 // 'default' => '#212529',
1192 'selectors' => [
1193 '{{WRAPPER}} .spe_pricing_item_btn' => 'color: {{VALUE}};',
1194 ],
1195 ]
1196 );
1197
1198 $this->add_control(
1199 'pricing_contents_btn_normal_bg',
1200 [
1201 'label' => esc_html__( 'Background Color', 'spider-elements' ),
1202 'type' => Controls_Manager::COLOR,
1203 'selectors' => [
1204 '{{WRAPPER}} .spe_pricing_item_btn' => 'background: {{VALUE}};',
1205 ],
1206 ]
1207 );
1208
1209 $this->add_group_control(
1210 Group_Control_Border::get_type(),
1211 [
1212 'name' => 'pricing_contents_btn_border',
1213 'label' => esc_html__( 'Border', 'spider-elements' ),
1214 'selector' => '{{WRAPPER}} .spe_pricing_item_btn',
1215 ]
1216 );
1217
1218 $this->add_control(
1219 'pricing_contents_btn_border_radius',
1220 [
1221 'label' => esc_html__( 'Border Radius', 'spider-elements' ),
1222 'type' => Controls_Manager::SLIDER,
1223 'range' => [
1224 'px' => [
1225 'max' => 50,
1226 ],
1227 ],
1228 'selectors' => [
1229 '{{WRAPPER}} .spe_pricing_item_btn' => 'border-radius: {{SIZE}}px;',
1230 ],
1231 ]
1232 );
1233
1234 $this->end_controls_tab();
1235
1236 // Hover State Tab
1237 $this->start_controls_tab( 'pricing_contents_btn_hover', [ 'label' => esc_html__( 'Hover', 'spider-elements' ) ] );
1238
1239 $this->add_control(
1240 'pricing_contents_btn_hover_text_color',
1241 [
1242 'label' => esc_html__( 'Text Color', 'spider-elements' ),
1243 'type' => Controls_Manager::COLOR,
1244 'default' => '#fff',
1245 'selectors' => [
1246 '{{WRAPPER}} .spe_pricing_item_btn:hover' => 'color: {{VALUE}};',
1247 ],
1248 ]
1249 );
1250
1251 $this->add_control(
1252 'pricing_contents_btn_hover_bg_color',
1253 [
1254 'label' => esc_html__( 'Background Color', 'spider-elements' ),
1255 'type' => Controls_Manager::COLOR,
1256 'default' => '#eb5757',
1257 'selectors' => [
1258 '{{WRAPPER}} .spe_pricing_item_btn:hover' => 'background: {{VALUE}};',
1259 ],
1260 ]
1261 );
1262
1263 $this->add_control(
1264 'pricing_contents_btn_hover_border_color',
1265 [
1266 'label' => esc_html__( 'Border Color', 'spider-elements' ),
1267 'type' => Controls_Manager::COLOR,
1268 'default' => '#eb5757',
1269 'selectors' => [
1270 '{{WRAPPER}} .spe_pricing_item_btn:hover' => 'border-color: {{VALUE}};',
1271 ],
1272 ]
1273
1274 );
1275
1276 $this->end_controls_tab();
1277
1278 $this->end_controls_tabs();
1279
1280 $this->add_group_control(
1281 Group_Control_Box_Shadow::get_type(),
1282 [
1283 'name' => 'pricing_contents_btn_boxShadow',
1284 'selector' => '{{WRAPPER}} .spe_pricing_item_btn',
1285 'separator' => 'before',
1286 ]
1287 );
1288
1289 $this->end_controls_section(); //End Button style
1290
1291
1292 //=============================== Shape Images ===================================//
1293 $this->start_controls_section(
1294 'shape_images', [
1295 'label' => esc_html__( 'Shape Images', 'spider-elements' ),
1296 'tab' => Controls_Manager::TAB_STYLE,
1297 'condition' => [
1298 'style' => [ '1' ]
1299 ]
1300 ]
1301 );
1302
1303 $this->add_control(
1304 'is_shape_image', [
1305 'label' => esc_html__( 'Show Shape Image', 'spider-elements' ),
1306 'type' => Controls_Manager::SWITCHER,
1307 'label_on' => esc_html__( 'Show', 'spider-elements' ),
1308 'label_off' => esc_html__( 'Hide', 'spider-elements' ),
1309 'return_value' => 'yes',
1310 'default' => 'yes',
1311 ]
1312 );
1313
1314 $this->add_control(
1315 'shape1', [
1316 'label' => esc_html__( 'Shape ', 'spider-elements' ),
1317 'type' => Controls_Manager::MEDIA,
1318 'condition' => [
1319 'is_shape_image' => 'yes'
1320 ]
1321 ]
1322 );
1323
1324 $this->add_control(
1325 'shape2', [
1326 'label' => esc_html__( 'Shape 2', 'spider-elements' ),
1327 'type' => Controls_Manager::MEDIA,
1328 'condition' => [
1329 'is_shape_image' => 'yes'
1330 ]
1331 ]
1332 );
1333
1334 $this->end_controls_section(); //End Shape Images
1335
1336
1337 }
1338
1339
1340 /**
1341 * Name: elementor_render()
1342 * Desc: Render widget output on the frontend.
1343 * Params: no params
1344 * Return: @void
1345 * Since: @1.0.0
1346 * Package: @spider-elements
1347 * Author: spider-themes
1348 */
1349 protected function render() {
1350 $settings = $this->get_settings_for_display();
1351 extract( $settings ); // extract all settings array to variables converted to name of key
1352
1353 $tables = isset( $settings['pricing_table_1'] ) ? $settings['pricing_table_1'] : '';
1354 $tables2 = isset( $settings['pricing_table_2'] ) ? $settings['pricing_table_2'] : '';
1355
1356 //Include template parts
1357 include "templates/pricing-table-switcher/table-switcher-{$settings['style']}.php";
1358
1359 }
1360
1361 }