PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.15.2
Shortcodes and extra features for Phlox theme v2.15.2
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / heading-modern.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 2 years ago accordion.php 4 years ago audio.php 4 years ago before-after.php 3 years ago button.php 4 years ago carousel-navigation.php 4 years ago circle-chart.php 3 years ago contact-box.php 4 years ago contact-form.php 4 years ago custom-list.php 4 years ago divider.php 4 years ago gallery.php 2 years ago gmap.php 4 years ago heading-modern.php 3 years ago icon.php 3 years ago image.php 4 years ago mailchimp.php 4 years ago modern-button.php 4 years ago products-grid.php 3 years ago quote.php 4 years ago recent-comments.php 4 years ago recent-posts-grid-carousel.php 4 years ago recent-posts-land-style.php 4 years ago recent-posts-masonry.php 4 years ago recent-posts-tiles-carousel.php 4 years ago recent-posts-tiles.php 4 years ago recent-posts-timeline.php 4 years ago recent-products.php 4 years ago responsive-table.php 3 years ago search.php 4 years ago staff.php 4 years ago svg.php 3 years ago tabs.php 3 years ago testimonial.php 4 years ago text.php 4 years ago touch-slider.php 4 years ago video.php 4 years ago
heading-modern.php
1248 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Group_Control_Text_Stroke;
9 use Elementor\Core\Schemes\Typography;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Text_Shadow;
12 use Elementor\Group_Control_Background;
13
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit; // Exit if accessed directly.
17 }
18
19 /**
20 * Elementor 'ModernHeading' widget.
21 *
22 * Elementor widget that displays an 'ModernHeading' with lightbox.
23 *
24 * @since 1.0.0
25 */
26 class ModernHeading extends Widget_Base {
27
28 /**
29 * Get widget name.
30 *
31 * Retrieve 'ModernHeading' widget name.
32 *
33 * @since 1.0.0
34 * @access public
35 *
36 * @return string Widget name.
37 */
38 public function get_name() {
39 return 'aux_modern_heading';
40 }
41
42 /**
43 * Get widget title.
44 *
45 * Retrieve 'ModernHeading' widget title.
46 *
47 * @since 1.0.0
48 * @access public
49 *
50 * @return string Widget title.
51 */
52 public function get_title() {
53 return __('Modern Heading', 'auxin-elements' );
54 }
55
56 /**
57 * Get widget icon.
58 *
59 * Retrieve 'ModernHeading' widget icon.
60 *
61 * @since 1.0.0
62 * @access public
63 *
64 * @return string Widget icon.
65 */
66 public function get_icon() {
67 return 'eicon-heading auxin-badge';
68 }
69
70 /**
71 * Get widget categories.
72 *
73 * Retrieve 'ModernHeading' widget icon.
74 *
75 * @since 1.0.0
76 * @access public
77 *
78 * @return string Widget icon.
79 */
80 public function get_categories() {
81 return array( 'auxin-core' );
82 }
83
84 /**
85 * Register 'ModernHeading' widget controls.
86 *
87 * Adds different input fields to allow the user to change and customize the widget settings.
88 *
89 * @since 1.0.0
90 * @access protected
91 */
92 protected function register_controls() {
93
94 /*-----------------------------------------------------------------------------------*/
95 /* Content TAB
96 /*-----------------------------------------------------------------------------------*/
97
98 $this->start_controls_section(
99 'title_section',
100 array(
101 'label' => __('Heading', 'auxin-elements' ),
102 )
103 );
104
105 $this->add_control(
106 'title',
107 array(
108 'label' => __( 'Title', 'auxin-elements' ),
109 'type' => Controls_Manager::TEXTAREA,
110 'dynamic' => array(
111 'active' => true
112 ),
113 'default' => __( 'Add your heading text here ..', 'auxin-elements' ),
114 'label_block' => true
115 )
116 );
117
118 $this->add_control(
119 'link',
120 array(
121 'label' => __('Link','auxin-elements' ),
122 'type' => Controls_Manager::URL,
123 'placeholder' => 'http://your-link.com',
124 'show_external' => true,
125 'label_block' => true,
126 'dynamic' => array(
127 'active' => true
128 )
129 )
130 );
131
132 $this->add_control(
133 'title_tag',
134 array(
135 'label' => __( 'HTML Tag', 'auxin-elements' ),
136 'type' => Controls_Manager::SELECT,
137 'options' => array(
138 'h1' => 'H1',
139 'h2' => 'H2',
140 'h3' => 'H3',
141 'h4' => 'H4',
142 'h5' => 'H5',
143 'h6' => 'H6',
144 'div' => 'div',
145 'span' => 'span',
146 'p' => 'p'
147 ),
148 'default' => 'h2',
149 )
150 );
151
152 $this->add_responsive_control(
153 'alignment',
154 array(
155 'label' => __('Alignment', 'auxin-elements'),
156 'type' => Controls_Manager::CHOOSE,
157 'default' => '',
158 'options' => array(
159 'left' => array(
160 'title' => __( 'Left', 'auxin-elements' ),
161 'icon' => 'eicon-text-align-left',
162 ),
163 'center' => array(
164 'title' => __( 'Center', 'auxin-elements' ),
165 'icon' => 'eicon-text-align-center',
166 ),
167 'right' => array(
168 'title' => __( 'Right', 'auxin-elements' ),
169 'icon' => 'eicon-text-align-right',
170 )
171 ),
172 'selectors_dictionary' => [
173 'left' => '',
174 'center' => 'text-align:center;margin-left:auto !important;margin-right:auto !important;',
175 'right' => 'text-align:right;margin-left:auto !important;'
176 ],
177 'selectors' => [
178 '{{WRAPPER}} .aux-widget-inner > *' => '{{VALUE}}'
179 ]
180 )
181 );
182
183 /* Divider
184 /*-------------------------------------*/
185
186 $this->add_control(
187 'divider',
188 array(
189 'label' => __( 'Display Divider', 'auxin-elements' ),
190 'type' => Controls_Manager::SWITCHER,
191 'label_on' => __( 'On', 'auxin-elements' ),
192 'label_off' => __( 'Off', 'auxin-elements' ),
193 'return_value' => 'yes',
194 'default' => 'yes',
195 'separator' => 'before'
196 )
197 );
198
199 $this->add_control(
200 'divider_position',
201 array(
202 'label' => __( 'Divider Position', 'auxin-elements' ),
203 'type' => Controls_Manager::SELECT,
204 'options' => array(
205 'before' => __( 'Before Heading', 'auxin-elements' ),
206 'between' => __( 'Between Headings', 'auxin-elements' ),
207 'after' => __( 'After Headings', 'auxin-elements' )
208 ),
209 'default' => 'after',
210 'condition' => array(
211 'divider' => 'yes'
212 )
213 )
214 );
215
216 $this->end_controls_section();
217
218
219 /* Secondary heading
220 /*-------------------------------------*/
221
222 $this->start_controls_section(
223 'title_secondary_section',
224 array(
225 'label' => __('Secondary Heading', 'auxin-elements' ),
226 )
227 );
228
229 $this->add_control(
230 'title_secondary_before',
231 array(
232 'label' => __( 'Before Text', 'auxin-elements' ),
233 'type' => Controls_Manager::TEXT,
234 'dynamic' => array(
235 'active' => true
236 ),
237 'default' => '',
238 'label_block' => true
239 )
240 );
241
242 $this->add_control(
243 'title_secondary_highlight',
244 array(
245 'label' => __( 'Highlighted Text', 'auxin-elements' ),
246 'type' => Controls_Manager::TEXT,
247 'dynamic' => array(
248 'active' => true
249 ),
250 'default' => '',
251 'label_block' => true
252 )
253 );
254
255 $this->add_control(
256 'title_secondary_after',
257 array(
258 'label' => __( 'After Text', 'auxin-elements' ),
259 'type' => Controls_Manager::TEXT,
260 'dynamic' => array(
261 'active' => true
262 ),
263 'default' => '',
264 'label_block' => true
265 )
266 );
267
268 $this->add_control(
269 'link_secondary',
270 array(
271 'label' => __('Link','auxin-elements' ),
272 'type' => Controls_Manager::URL,
273 'placeholder' => 'http://your-link.com',
274 'show_external' => true,
275 'label_block' => true,
276 'dynamic' => array(
277 'active' => true
278 )
279 )
280 );
281
282 $this->add_control(
283 'title_tag_secondary',
284 array(
285 'label' => __( 'HTML Tag', 'auxin-elements' ),
286 'type' => Controls_Manager::SELECT,
287 'options' => array(
288 'h1' => 'H1',
289 'h2' => 'H2',
290 'h3' => 'H3',
291 'h4' => 'H4',
292 'h5' => 'H5',
293 'h6' => 'H6',
294 'div' => 'div',
295 'span' => 'span',
296 'p' => 'p'
297 ),
298 'default' => 'h3'
299 )
300 );
301
302 $this->end_controls_section();
303
304 /* Description
305 /*-------------------------------------*/
306
307 $this->start_controls_section(
308 'description_primary_section',
309 array(
310 'label' => __('Description', 'auxin-elements' ),
311 )
312 );
313
314 $this->add_control(
315 'description',
316 array(
317 'label' => __( 'Description', 'auxin-elements' ),
318 'type' => Controls_Manager::WYSIWYG,
319 'dynamic' => array(
320 'active' => true
321 ),
322 'label_block' => true,
323 'separator' => 'before'
324 )
325 );
326
327 $this->end_controls_section();
328
329
330 /*-----------------------------------------------------------------------------------*/
331 /* Style TAB
332 /*-----------------------------------------------------------------------------------*/
333
334 /* Title Section
335 /*-------------------------------------*/
336
337 $this->start_controls_section(
338 'title_style_section',
339 array(
340 'label' => __( 'Heading', 'auxin-elements' ),
341 'tab' => Controls_Manager::TAB_STYLE,
342 'condition' => ['title!' => '']
343 )
344 );
345
346 $this->add_group_control(
347 Group_Control_Typography::get_type(),
348 array(
349 'name' => 'title_typography',
350 'scheme' => Typography::TYPOGRAPHY_1,
351 'selector' => '{{WRAPPER}} .aux-modern-heading-primary'
352 )
353 );
354
355 if ( class_exists( 'Elementor\Group_Control_Text_Stroke' ) ) {
356 $this->add_group_control(
357 Group_Control_Text_Stroke::get_type(),
358 [
359 'name' => 'title_stroke',
360 'selector' => '{{WRAPPER}} .aux-modern-heading-primary'
361 ]
362 );
363 }
364
365 $this->start_controls_tabs( 'title_tabs' );
366
367 $this->start_controls_tab(
368 'title_tab_normal_state',
369 [
370 'label' => __( 'Normal', 'auxin-elements' ),
371 ]
372 );
373
374 $this->add_responsive_control(
375 'title_color',
376 array(
377 'label' => __( 'Color', 'auxin-elements' ),
378 'type' => Controls_Manager::COLOR,
379 'selectors' => array(
380 '{{WRAPPER}} .aux-modern-heading-primary' => 'color: {{VALUE}};'
381 )
382 )
383 );
384
385 $this->add_group_control(
386 Group_Control_Text_Shadow::get_type(),
387 [
388 'name' => 'title_text_shadow',
389 'label' => __( 'Text Shadow', 'auxin-elements' ),
390 'selector' => '{{WRAPPER}} .aux-modern-heading-primary'
391 ]
392 );
393
394 $this->add_group_control(
395 Group_Control_Background::get_type(),
396 [
397 'name' => 'title_background',
398 'selector' => '{{WRAPPER}} .aux-modern-heading-primary',
399 'types' => [ 'classic', 'gradient']
400 ]
401 );
402
403 $this->end_controls_tab();
404
405 $this->start_controls_tab(
406 'title_tab_hover_state',
407 [
408 'label' => __( 'Hover', 'auxin-elements' ),
409 ]
410 );
411
412 $this->add_responsive_control(
413 'title_hover_color',
414 array(
415 'label' => __( 'Color', 'auxin-elements' ),
416 'type' => Controls_Manager::COLOR,
417 'selectors' => array(
418 '{{WRAPPER}} .aux-modern-heading-primary:hover' => 'color: {{VALUE}};',
419 ),
420 )
421 );
422
423 $this->add_group_control(
424 Group_Control_Text_Shadow::get_type(),
425 [
426 'name' => 'title_hover_text_shadow',
427 'label' => __( 'Text Shadow', 'auxin-elements' ),
428 'selector' => '{{WRAPPER}} .aux-modern-heading-primary:hover'
429 ]
430 );
431
432 $this->add_group_control(
433 Group_Control_Background::get_type(),
434 [
435 'name' => 'title_hover_background',
436 'selector' => '{{WRAPPER}} .aux-modern-heading-primary:hover',
437 'types' => [ 'classic', 'gradient']
438 ]
439 );
440
441 $this->end_controls_tab();
442
443 $this->end_controls_tabs();
444
445 $this->add_responsive_control(
446 'title_margin',
447 [
448 'label' => __( 'Margin', 'auxin-elements' ),
449 'type' => Controls_Manager::DIMENSIONS,
450 'size_units' => [ 'px', 'em', '%' ],
451 'selectors' => [
452 '{{WRAPPER}} .aux-modern-heading-primary' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
453 ],
454 'separator' => 'before'
455 ]
456 );
457
458 $this->add_responsive_control(
459 'title_padding',
460 [
461 'label' => __( 'Padding', 'auxin-elements' ),
462 'type' => Controls_Manager::DIMENSIONS,
463 'size_units' => [ 'px', 'em', '%' ],
464 'selectors' => [
465 '{{WRAPPER}} .aux-modern-heading-primary' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
466 ]
467 ]
468 );
469
470 $this->add_responsive_control(
471 'title_border_radius',
472 [
473 'label' => __( 'Border radius', 'auxin-elements' ),
474 'type' => Controls_Manager::DIMENSIONS,
475 'size_units' => [ 'px', 'em', '%' ],
476 'allowed_dimensions' => 'all',
477 'selectors' => [
478 '{{WRAPPER}} .aux-modern-heading-primary' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
479 ]
480 ]
481 );
482
483 $this->add_responsive_control(
484 'title_width',
485 array(
486 'label' => __('Max Width','auxin-elements' ),
487 'type' => Controls_Manager::SLIDER,
488 'size_units' => array('px', 'em','%'),
489 'range' => array(
490 '%' => array(
491 'min' => 1,
492 'max' => 100,
493 'step' => 1
494 ),
495 'em' => array(
496 'min' => 1,
497 'max' => 100,
498 'step' => 1
499 ),
500 'px' => array(
501 'min' => 1,
502 'max' => 1600,
503 'step' => 1
504 )
505 ),
506 'selectors' => array(
507 '{{WRAPPER}} .aux-modern-heading-primary' => 'max-width:{{SIZE}}{{UNIT}};'
508 )
509 )
510 );
511
512 $this->end_controls_section();
513
514 /* Secondary title Section
515 /*-------------------------------------*/
516
517 $this->start_controls_section(
518 'title2_style_heading',
519 [
520 'label' => __( 'Secondary Heading', 'auxin-elements' ),
521 'tab' => Controls_Manager::TAB_STYLE,
522
523 'conditions' =>
524 [
525 'relation' => 'or',
526 'terms' => [
527 [
528 'name' => 'title_secondary_before',
529 'operator' => '!==',
530 'value' => '',
531 ], [
532 'name' => 'title_secondary_after',
533 'operator' => '!==',
534 'value' => '',
535 ]
536 ]
537 ]
538 ]
539 );
540
541 $this->add_group_control(
542 Group_Control_Typography::get_type(),
543 array(
544 'name' => 'title2_typography',
545 'scheme' => Typography::TYPOGRAPHY_1,
546 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary'
547 )
548 );
549
550 $this->start_controls_tabs( 'title2_tabs' );
551
552 $this->start_controls_tab(
553 'title2_tab_normal_state',
554 [
555 'label' => __( 'Normal', 'auxin-elements' ),
556 ]
557 );
558
559 $this->add_responsive_control(
560 'title2_color',
561 array(
562 'label' => __( 'Color', 'auxin-elements' ),
563 'type' => Controls_Manager::COLOR,
564 'selectors' => array(
565 '{{WRAPPER}} .aux-modern-heading-secondary' => 'color: {{VALUE}};'
566 )
567 )
568 );
569
570 $this->add_group_control(
571 Group_Control_Text_Shadow::get_type(),
572 [
573 'name' => 'title2_text_shadow',
574 'label' => __( 'Text Shadow', 'auxin-elements' ),
575 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary'
576 ]
577 );
578
579 $this->add_group_control(
580 Group_Control_Background::get_type(),
581 [
582 'name' => 'title2_background',
583 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary',
584 'types' => [ 'classic', 'gradient']
585 ]
586 );
587
588 $this->end_controls_tab();
589
590 $this->start_controls_tab(
591 'title2_tab_hover_state',
592 [
593 'label' => __( 'Hover', 'auxin-elements' ),
594 ]
595 );
596
597 $this->add_responsive_control(
598 'title2_hover_color',
599 array(
600 'label' => __( 'Color', 'auxin-elements' ),
601 'type' => Controls_Manager::COLOR,
602 'selectors' => array(
603 '{{WRAPPER}} .aux-modern-heading-secondary:hover' => 'color: {{VALUE}};',
604 ),
605 )
606 );
607
608 $this->add_group_control(
609 Group_Control_Text_Shadow::get_type(),
610 [
611 'name' => 'title2_hover_text_shadow',
612 'label' => __( 'Text Shadow', 'auxin-elements' ),
613 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary:hover'
614 ]
615 );
616
617 $this->add_group_control(
618 Group_Control_Background::get_type(),
619 [
620 'name' => 'title2_hover_background',
621 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary:hover',
622 'types' => [ 'classic', 'gradient']
623 ]
624 );
625
626 $this->end_controls_tab();
627
628 $this->end_controls_tabs();
629
630 $this->add_responsive_control(
631 'title2_margin',
632 [
633 'label' => __( 'Margin', 'auxin-elements' ),
634 'type' => Controls_Manager::DIMENSIONS,
635 'size_units' => [ 'px', 'em', '%' ],
636 'selectors' => [
637 '{{WRAPPER}} .aux-modern-heading-secondary' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
638 ],
639 'separator' => 'before'
640 ]
641 );
642
643 $this->add_responsive_control(
644 'title2_padding',
645 [
646 'label' => __( 'Padding', 'auxin-elements' ),
647 'type' => Controls_Manager::DIMENSIONS,
648 'size_units' => [ 'px', 'em', '%' ],
649 'selectors' => [
650 '{{WRAPPER}} .aux-modern-heading-secondary' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
651 ]
652 ]
653 );
654
655 $this->add_responsive_control(
656 'title2_border_radius',
657 [
658 'label' => __( 'Border radius', 'auxin-elements' ),
659 'type' => Controls_Manager::DIMENSIONS,
660 'size_units' => [ 'px', 'em', '%' ],
661 'allowed_dimensions' => 'all',
662 'selectors' => [
663 '{{WRAPPER}} .aux-modern-heading-secondary' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
664 ]
665 ]
666 );
667
668 $this->add_responsive_control(
669 'title2_width',
670 array(
671 'label' => __('Max Width','auxin-elements' ),
672 'type' => Controls_Manager::SLIDER,
673 'size_units' => array('px', 'em','%'),
674 'range' => array(
675 '%' => array(
676 'min' => 1,
677 'max' => 100,
678 'step' => 1
679 ),
680 'em' => array(
681 'min' => 1,
682 'max' => 100,
683 'step' => 1
684 ),
685 'px' => array(
686 'min' => 1,
687 'max' => 1600,
688 'step' => 1
689 )
690 ),
691 'selectors' => array(
692 '{{WRAPPER}} .aux-modern-heading-secondary' => 'max-width:{{SIZE}}{{UNIT}};'
693 )
694 )
695 );
696
697 $this->end_controls_section();
698
699
700 /* Secondary Highlighted Style
701 /*-------------------------------------*/
702
703 $this->start_controls_section(
704 'title2_highlighted_style_heading',
705 [
706 'label' => __( 'Secondary Heading - Highlighted', 'auxin-elements' ),
707 'tab' => Controls_Manager::TAB_STYLE,
708 'condition' => [ 'title_secondary_highlight!' => '' ]
709 ]
710 );
711
712 $this->add_group_control(
713 Group_Control_Typography::get_type(),
714 array(
715 'name' => 'title2_highlighted_typography',
716 'scheme' => Typography::TYPOGRAPHY_1,
717 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight'
718 )
719 );
720
721 $this->start_controls_tabs( 'title2_highlighted_tabs' );
722
723 $this->start_controls_tab(
724 'title2_highlighted_tab_normal_state',
725 [
726 'label' => __( 'Normal', 'auxin-elements' ),
727 ]
728 );
729
730 $this->add_responsive_control(
731 'title2_highlighted_color',
732 array(
733 'label' => __( 'Color', 'auxin-elements' ),
734 'type' => Controls_Manager::COLOR,
735 'selectors' => array(
736 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight' => 'color: {{VALUE}};'
737 )
738 )
739 );
740
741 $this->add_group_control(
742 Group_Control_Text_Shadow::get_type(),
743 [
744 'name' => 'title2_highlighted_text_shadow',
745 'label' => __( 'Text Shadow', 'auxin-elements' ),
746 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight'
747 ]
748 );
749
750 $this->add_group_control(
751 Group_Control_Background::get_type(),
752 [
753 'name' => 'title2_highlighted_background',
754 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight',
755 'types' => [ 'classic', 'gradient']
756 ]
757 );
758
759 $this->end_controls_tab();
760
761 $this->start_controls_tab(
762 'title2_highlighted_tab_hover_state',
763 [
764 'label' => __( 'Hover', 'auxin-elements' ),
765 ]
766 );
767
768 $this->add_responsive_control(
769 'title2_highlighted_hover_color',
770 array(
771 'label' => __( 'Color', 'auxin-elements' ),
772 'type' => Controls_Manager::COLOR,
773 'selectors' => array(
774 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight:hover' => 'color: {{VALUE}};',
775 ),
776 )
777 );
778
779 $this->add_group_control(
780 Group_Control_Text_Shadow::get_type(),
781 [
782 'name' => 'title2_highlighted_hover_text_shadow',
783 'label' => __( 'Text Shadow', 'auxin-elements' ),
784 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight:hover'
785 ]
786 );
787
788 $this->add_group_control(
789 Group_Control_Background::get_type(),
790 [
791 'name' => 'title2_highlighted_hover_background',
792 'selector' => '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight:hover',
793 'types' => [ 'classic', 'gradient']
794 ]
795 );
796
797 $this->end_controls_tab();
798
799 $this->end_controls_tabs();
800
801 $this->add_responsive_control(
802 'title2_highlighted_margin',
803 [
804 'label' => __( 'Margin', 'auxin-elements' ),
805 'type' => Controls_Manager::DIMENSIONS,
806 'size_units' => [ 'px', 'em', '%' ],
807 'selectors' => [
808 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
809 ],
810 'separator' => 'before'
811 ]
812 );
813
814 $this->add_responsive_control(
815 'title2_highlighted_padding',
816 [
817 'label' => __( 'Padding', 'auxin-elements' ),
818 'type' => Controls_Manager::DIMENSIONS,
819 'size_units' => [ 'px', 'em', '%' ],
820 'selectors' => [
821 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
822 ]
823 ]
824 );
825
826 $this->add_responsive_control(
827 'title2_highlighted_border_radius',
828 [
829 'label' => __( 'Border radius', 'auxin-elements' ),
830 'type' => Controls_Manager::DIMENSIONS,
831 'size_units' => [ 'px', 'em', '%' ],
832 'allowed_dimensions' => 'all',
833 'selectors' => [
834 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
835 ]
836 ]
837 );
838
839 $this->add_responsive_control(
840 'title2_highlighted_width',
841 array(
842 'label' => __('Max Width','auxin-elements' ),
843 'type' => Controls_Manager::SLIDER,
844 'size_units' => array('px', 'em','%'),
845 'range' => array(
846 '%' => array(
847 'min' => 1,
848 'max' => 100,
849 'step' => 1
850 ),
851 'em' => array(
852 'min' => 1,
853 'max' => 100,
854 'step' => 1
855 ),
856 'px' => array(
857 'min' => 1,
858 'max' => 1600,
859 'step' => 1
860 )
861 ),
862 'selectors' => array(
863 '{{WRAPPER}} .aux-modern-heading-secondary .aux-head-highlight' => 'max-width:{{SIZE}}{{UNIT}};'
864 )
865 )
866 );
867
868 $this->end_controls_section();
869
870 /* Divider Section
871 /*-------------------------------------*/
872
873 $this->start_controls_section(
874 'divider_style_section',
875 [
876 'label' => __( 'Divider', 'auxin-elements' ),
877 'tab' => Controls_Manager::TAB_STYLE,
878 'condition' => [
879 'divider' => 'yes'
880 ]
881 ]
882 );
883
884 $this->add_responsive_control(
885 'divider_weight',
886 array(
887 'label' => __( 'Weight', 'auxin-elements' ),
888 'type' => Controls_Manager::SLIDER,
889 'size_units' => array( 'px' ),
890 'range' => array(
891 'px' => array(
892 'max' => 10
893 )
894 ),
895 'selectors' => array(
896 '{{WRAPPER}} .aux-modern-heading-divider' => 'height: {{SIZE}}{{UNIT}};'
897 )
898 )
899 );
900
901 $this->add_responsive_control(
902 'divider_width',
903 array(
904 'label' => __( 'Width', 'auxin-elements' ),
905 'type' => Controls_Manager::SLIDER,
906 'size_units' => array( 'px', '%' ),
907 'range' => array(
908 'px' => array(
909 'min' => 1,
910 'max' => 1200
911 ),
912 '%' => array(
913 'min' => 1,
914 'max' => 100
915 )
916 ),
917 'selectors' => array(
918 '{{WRAPPER}} .aux-modern-heading-divider' => 'width: {{SIZE}}{{UNIT}};'
919 )
920 )
921 );
922
923 $this->add_responsive_control(
924 'divider_margin',
925 array(
926 'label' => __( 'Margin', 'auxin-elements' ),
927 'type' => Controls_Manager::DIMENSIONS,
928 'size_units' => array( 'px', 'em' ),
929 'allowed_dimensions' => 'all',
930 'selectors' => array(
931 '{{WRAPPER}} .aux-modern-heading-divider' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
932 )
933 )
934 );
935
936 $this->add_responsive_control(
937 'divider_color',
938 array(
939 'label' => __( 'Color', 'auxin-elements' ),
940 'type' => Controls_Manager::COLOR,
941 'selectors' => array(
942 '{{WRAPPER}} .aux-modern-heading-divider' => 'background-color: {{VALUE}};'
943 )
944 )
945 );
946
947 $this->add_group_control(
948 Group_Control_Box_Shadow::get_type(),
949 array(
950 'name' => 'divider_shadow',
951 'selector' => '{{WRAPPER}} .aux-modern-heading-divider',
952 'separator' => 'before'
953 )
954 );
955
956 $this->add_group_control(
957 Group_Control_Background::get_type(),
958 array(
959 'name' => 'divider_backgoundcolor',
960 'label' => __( 'Background', 'auxin-elements' ),
961 'selector' => '{{WRAPPER}} .aux-modern-heading-divider'
962 )
963 );
964
965 $this->end_controls_section();
966
967 /* Description Section
968 /*-------------------------------------*/
969
970 $this->start_controls_section(
971 'description_style_section',
972 array(
973 'label' => __( 'Description', 'auxin-elements' ),
974 'tab' => Controls_Manager::TAB_STYLE,
975 'condition' => [ 'description!' => '' ]
976 )
977 );
978
979 $this->add_responsive_control(
980 'description_color',
981 array(
982 'label' => __( 'Color', 'auxin-elements' ),
983 'type' => Controls_Manager::COLOR,
984 'selectors' => array(
985 '{{WRAPPER}} .aux-modern-heading-description' => 'color: {{VALUE}};'
986 )
987 )
988 );
989
990 $this->add_group_control(
991 Group_Control_Typography::get_type(),
992 array(
993 'name' => 'description_typography',
994 'scheme' => Typography::TYPOGRAPHY_1,
995 'selector' => '{{WRAPPER}} .aux-modern-heading-description'
996 )
997 );
998
999 $this->add_responsive_control(
1000 'description_margin',
1001 array(
1002 'label' => __( 'Margin', 'auxin-elements' ),
1003 'type' => Controls_Manager::DIMENSIONS,
1004 'size_units' => array( 'px', 'em' ),
1005 'allowed_dimensions' => 'all',
1006 'selectors' => array(
1007 '{{WRAPPER}} .aux-modern-heading-description' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1008 )
1009 )
1010 );
1011
1012 $this->add_responsive_control(
1013 'description_width',
1014 array(
1015 'label' => __('Max Width','auxin-elements' ),
1016 'type' => Controls_Manager::SLIDER,
1017 'size_units' => array('px', 'em','%'),
1018 'range' => array(
1019 '%' => array(
1020 'min' => 1,
1021 'max' => 100,
1022 'step' => 1
1023 ),
1024 'em' => array(
1025 'min' => 1,
1026 'max' => 100,
1027 'step' => 1
1028 ),
1029 'px' => array(
1030 'min' => 1,
1031 'max' => 1600,
1032 'step' => 1
1033 )
1034 ),
1035 'selectors' => array(
1036 '{{WRAPPER}} .aux-modern-heading-description' => 'max-width:{{SIZE}}{{UNIT}};'
1037 )
1038 )
1039 );
1040
1041 $this->end_controls_section();
1042
1043 /* Wrapper Section
1044 /*-------------------------------------*/
1045
1046 $this->start_controls_section(
1047 'wrapper_style_section',
1048 array(
1049 'label' => __( 'Wrapper', 'auxin-elements' ),
1050 'tab' => Controls_Manager::TAB_STYLE
1051 )
1052 );
1053
1054 $this->add_responsive_control(
1055 'width',
1056 array(
1057 'label' => __('Width','auxin-elements' ),
1058 'type' => Controls_Manager::SLIDER,
1059 'size_units' => array('px', 'em','%', 'vw'),
1060 'range' => array(
1061 '%' => array(
1062 'min' => 1,
1063 'max' => 100,
1064 'step' => 1
1065 ),
1066 'em' => array(
1067 'min' => 1,
1068 'max' => 100,
1069 'step' => 1
1070 ),
1071 'px' => array(
1072 'min' => 1,
1073 'max' => 1600,
1074 'step' => 1
1075 )
1076 ),
1077 'selectors' => array(
1078 '{{WRAPPER}} .aux-widget-modern-heading .aux-widget-inner' => 'width:{{SIZE}}{{UNIT}};'
1079 )
1080 )
1081 );
1082
1083 $this->add_responsive_control(
1084 'height',
1085 array(
1086 'label' => __('Height','auxin-elements' ),
1087 'type' => Controls_Manager::SLIDER,
1088 'size_units' => array('px', 'em', '%', 'vh'),
1089 'range' => array(
1090 '%' => array(
1091 'min' => 1,
1092 'max' => 100,
1093 'step' => 1
1094 ),
1095 'em' => array(
1096 'min' => 1,
1097 'max' => 100,
1098 'step' => 1
1099 ),
1100 'px' => array(
1101 'min' => 1,
1102 'max' => 1600,
1103 'step' => 1
1104 )
1105
1106 ),
1107 'selectors' => array(
1108 '{{WRAPPER}} .aux-widget-modern-heading .aux-widget-inner' => 'height:{{SIZE}}{{UNIT}};'
1109 )
1110 )
1111 );
1112
1113 $this->add_responsive_control(
1114 'wrapper_margin',
1115 array(
1116 'label' => __( 'Margin', 'auxin-elements' ),
1117 'type' => Controls_Manager::DIMENSIONS,
1118 'size_units' => array( 'px', 'em'),
1119 'allowed_dimensions' => 'all',
1120 'selectors' => array(
1121 '{{WRAPPER}} .aux-widget-modern-heading .aux-widget-inner' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1122 )
1123 )
1124 );
1125
1126 $this->add_responsive_control(
1127 'wrapper_padding',
1128 array(
1129 'label' => __( 'Padding', 'auxin-elements' ),
1130 'type' => Controls_Manager::DIMENSIONS,
1131 'size_units' => array( 'px', 'em', '%'),
1132 'allowed_dimensions' => 'all',
1133 'selectors' => array(
1134 '{{WRAPPER}} .aux-widget-modern-heading .aux-widget-inner' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1135 )
1136 )
1137 );
1138
1139 $this->end_controls_section();
1140 }
1141
1142 /**
1143 * Render 'ModernHeading' widget output on the frontend.
1144 *
1145 * Written in PHP and used to generate the final HTML.
1146 *
1147 * @since 1.0.0
1148 * @access protected
1149 */
1150 protected function render() {
1151
1152 $settings = $this->get_settings_for_display();
1153
1154 $divider_markup = auxin_is_true( $settings['divider'] ) ? '<div class="aux-modern-heading-divider"></div>' : '';
1155
1156 echo '<section class="aux-widget-modern-heading">
1157 <div class="aux-widget-inner">';
1158
1159 // Maybe print divider before
1160 if( empty( $settings['divider_position'] ) || 'before' == $settings['divider_position'] ){
1161 echo wp_kses_post( $divider_markup );
1162 }
1163
1164 // Print Primary Heading
1165 if( ! empty( $settings['link']['url'] ) ){
1166
1167 // Make Link attributes
1168 $this->add_render_attribute( 'link-primary', 'href', $settings['link']['url'] );
1169 $this->add_render_attribute( 'link-primary', 'class', 'aux-modern-heading-primary-link' );
1170 if ( $settings['link']['is_external'] ) {
1171 $this->add_render_attribute( 'link-primary', 'target', '_blank' );
1172 }
1173 if ( $settings['link']['nofollow'] ) {
1174 $this->add_render_attribute( 'link-primary', 'rel', 'nofollow' );
1175 }
1176
1177 printf( '<a %1$s><%2$s class="aux-modern-heading-primary">%3$s</%2$s></a>',
1178 $this->get_render_attribute_string( 'link-primary' ),
1179 esc_attr( $settings['title_tag'] ),
1180 wp_kses_post( $settings['title'] )
1181 );
1182
1183 } else {
1184 printf( '<%1$s class="aux-modern-heading-primary">%2$s</%1$s>',
1185 esc_attr( $settings['title_tag'] ),
1186 wp_kses_post( $settings['title'] )
1187 );
1188 }
1189
1190 // Maybe print divider between
1191 if( 'between' == $settings['divider_position'] ){
1192 echo wp_kses_post( $divider_markup );
1193 }
1194
1195 // Print Secondary Heading
1196 $before_heading = $settings['title_secondary_before'] ? '' . '<span class="aux-head-before">' . wp_kses_post( $settings['title_secondary_before'] ) . '</span>' : '';
1197 $highlight_heading = $settings['title_secondary_highlight'] ? '' . '<span class="aux-head-highlight">' . wp_kses_post( $settings['title_secondary_highlight'] ) . '</span>' : '';
1198 $after_heading = $settings['title_secondary_after' ] ? '' . '<span class="aux-head-after">' . wp_kses_post( $settings['title_secondary_after' ] ) . '</span>' : '';
1199
1200 if( $before_heading || $highlight_heading || $after_heading ){
1201
1202 if( ! empty( $settings['link_secondary']['url'] ) ){
1203
1204 // Make Link attributes
1205 $this->add_render_attribute( 'link-secondary', 'href', $settings['link_secondary']['url'] );
1206 $this->add_render_attribute( 'link-secondary', 'class', 'aux-modern-heading-secondary-link' );
1207 if ( $settings['link_secondary']['is_external'] ) {
1208 $this->add_render_attribute( 'link-secondary', 'target', '_blank' );
1209 }
1210 if ( $settings['link_secondary']['nofollow'] ) {
1211 $this->add_render_attribute( 'link-secondary', 'rel', 'nofollow' );
1212 }
1213
1214 printf( '<a %1$s><%2$s class="aux-modern-heading-secondary">%3$s%4$s%5$s</%2$s></a>',
1215 $this->get_render_attribute_string( 'link-secondary' ),
1216 esc_attr( $settings['title_tag_secondary'] ),
1217 wp_kses_post( $before_heading ),
1218 wp_kses_post( $highlight_heading ),
1219 wp_kses_post( $after_heading )
1220 );
1221 } else {
1222 printf( '<%1$s class="aux-modern-heading-secondary">%2$s%3$s%4$s</%1$s>',
1223 esc_attr( $settings['title_tag_secondary'] ),
1224 wp_kses_post( $before_heading ),
1225 wp_kses_post( $highlight_heading ),
1226 wp_kses_post( $after_heading )
1227 );
1228 }
1229
1230 }
1231
1232 // Maybe Print divider after
1233 if( 'after' == $settings['divider_position'] ){
1234 echo wp_kses_post( $divider_markup );
1235 }
1236
1237 if( ! empty( $settings['description'] ) ){
1238 printf( '<div class="aux-modern-heading-description">%s</div>',
1239 wp_kses_post( $settings['description'] )
1240 );
1241 }
1242
1243 echo '</div>
1244 </section>';
1245 }
1246
1247 }
1248