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