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