PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.19
Shortcodes and extra features for Phlox theme v2.5.19
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 / theme-elements / menu.php
auxin-elements / includes / elementor / widgets / theme-elements Last commit date
breadcrumbs.php 6 years ago copyright.php 6 years ago current-time.php 6 years ago logo.php 6 years ago menu.php 6 years ago modern-search.php 6 years ago search.php 6 years ago shopping-cart.php 6 years ago site-title.php 6 years ago
menu.php
1494 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements\Theme_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_Border;
10 use Elementor\Group_Control_Background;
11 use Elementor\Group_Control_Box_Shadow;
12 use Elementor\Group_Control_Text_Shadow;
13
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit; // Exit if accessed directly.
17 }
18
19 /**
20 * Elementor 'MenuBox' widget.
21 *
22 * Elementor widget that displays an 'MenuBox'.
23 *
24 * @since 1.0.0
25 */
26 class MenuBox extends Widget_Base {
27
28 /**
29 * Get widget name.
30 *
31 * Retrieve 'MenuBox' 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_menu_box';
40 }
41
42 /**
43 * Get widget title.
44 *
45 * Retrieve 'MenuBox' 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 __('Navigation Menu', 'auxin-elements' );
54 }
55
56 /**
57 * Get widget icon.
58 *
59 * Retrieve 'MenuBox' 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-nav-menu auxin-badge';
68 }
69
70 /**
71 * Get widget categories.
72 *
73 * Retrieve 'MenuBox' 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', 'auxin-theme-elements' );
82 }
83
84 /**
85 * Get the all available menus
86 *
87 * Retrieve the list of all menus.
88 *
89 * @since 1.0.0
90 * @access public
91 *
92 * @return array menu slug.
93 */
94 private function get_available_menus() {
95 $menus = wp_get_nav_menus();
96
97 $options = array();
98
99 foreach ( $menus as $menu ) {
100 $options[ $menu->slug ] = $menu->name;
101 }
102
103 return $options;
104 }
105
106
107 /**
108 * Register 'MenuBox' widget controls.
109 *
110 * Adds different input fields to allow the user to change and customize the widget settings.
111 *
112 * @since 1.0.0
113 * @access protected
114 */
115 protected function _register_controls() {
116
117 $this->start_controls_section(
118 'general',
119 array(
120 'label' => __('General', 'auxin-elements' ),
121 )
122 );
123
124 $menus = $this->get_available_menus();
125
126 if ( ! empty( $menus ) ) {
127 $this->add_control(
128 'menu_slug',
129 array(
130 'label' => __( 'Menu', 'auxin-elements' ),
131 'type' => Controls_Manager::SELECT,
132 'options' => $menus,
133 'default' => array_keys( $menus )[0],
134 'save_default' => true,
135 'description' => sprintf(
136 __( 'Go to the %s Menus screen %s to manage your menus.', 'auxin-elements' ),
137 '<a href="'. self_admin_url( 'nav-menus.php' ) .'" target="_blank">',
138 '</a>'
139 )
140 )
141 );
142 } else {
143 $this->add_control(
144 'menu_slug',
145 array(
146 'type' => Controls_Manager::RAW_HTML,
147 'raw' => sprintf( __( '<strong>There are no menus in your site.</strong><br>Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'auxin-elements' ), self_admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
148 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
149 )
150 );
151 }
152
153 $this->add_control(
154 'type',
155 array(
156 'label' => __('Type', 'auxin-elements'),
157 'type' => Controls_Manager::SELECT,
158 'default' => 'horizontal',
159 'options' => array(
160 'horizontal' => __('Horizontal' , 'auxin-elements' ),
161 'vertical' => __('Vertical' , 'auxin-elements' ),
162 'burger' => __('Burger' , 'auxin-elements' )
163 ),
164 'condition' => array(
165 'menu_slug!' => ''
166 )
167 )
168 );
169
170 $this->add_control(
171 'splitter',
172 array(
173 'label' => __( 'Display Menu Splitter', 'auxin-elements' ),
174 'type' => Controls_Manager::SWITCHER,
175 'label_on' => __( 'On', 'auxin-elements' ),
176 'label_off' => __( 'Off', 'auxin-elements' ),
177 'return_value' => 'yes',
178 'default' => 'yes',
179 'condition' => array(
180 'type' => 'horizontal'
181 )
182 )
183 );
184
185 $this->add_control(
186 'indicator',
187 array(
188 'label' => __( 'Display Submenu Indicator', 'auxin-elements' ),
189 'type' => Controls_Manager::SWITCHER,
190 'label_on' => __( 'On', 'auxin-elements' ),
191 'label_off' => __( 'Off', 'auxin-elements' ),
192 'return_value' => 'yes',
193 'default' => 'yes',
194 )
195 );
196
197 $this->end_controls_section();
198
199 $this->start_controls_section(
200 'mobile_menu_section',
201 array(
202 'label' => __('Mobile Menu', 'auxin-elements' ),
203 )
204 );
205
206 $this->add_control(
207 'display_burger',
208 array(
209 'label' => __('Display Mobile Menu on', 'auxin-elements'),
210 'label_block' => true,
211 'type' => Controls_Manager::SELECT,
212 'default' => '768',
213 'options' => array(
214 '1024' => __('Tablet (1024px and lower)' , 'auxin-elements' ),
215 '768' => __('Mobile (768px and lower)' , 'auxin-elements' ),
216 'custom' => __('Custom Breakpoint', 'auxin-elements' )
217 ),
218 'condition' => array(
219 'menu_slug!' => ''
220 )
221 )
222 );
223
224 $this->add_control(
225 'breakpoint',
226 array(
227 'label' => __('BreakPoint (pixel)', 'auxin-elements' ),
228 'type' => Controls_Manager::SLIDER,
229 'size_units' => array('px'),
230 'range' => array(
231 'px' => array(
232 'min' => 1,
233 'max' => 1600,
234 'step' => 1
235 )
236 ),
237 'default' => array(
238 'unit' => 'px',
239 'size' => 768
240 ),
241 'separator' => 'before',
242 'condition' => array(
243 'type!' => 'burger',
244 'display_burger' => 'custom'
245 )
246 )
247 );
248
249 $this->add_control(
250 'burger_menu_location',
251 array(
252 'label' => __('Mobile Menu Type', 'auxin-elements' ),
253 'type' => 'aux-visual-select',
254 'style_items' => '',
255 'options' => array(
256 'toggle-bar' => array(
257 'label' => __( 'Expandable under top header', 'auxin-elements' ),
258 'image' => AUXIN_URL . 'images/visual-select/burger-menu-location-1.svg'
259 ),
260 'overlay' => array(
261 'label' => __( 'FullScreen on entire page', 'auxin-elements' ),
262 'image' => AUXIN_URL . 'images/visual-select/burger-menu-location-3.svg'
263 ),
264 'offcanvas' => array(
265 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
266 'image' => AUXIN_URL . 'images/visual-select/burger-menu-location-2.svg'
267 )
268 ),
269 'default' => 'toggle-bar',
270 'seperator' => 'before'
271 )
272 );
273
274 $this->add_control(
275 'offcanvas_align',
276 array(
277 'label' => __( 'Position', 'auxin-elements' ),
278 'type' => Controls_Manager::SELECT,
279 'default' => 'left',
280 'options' => array(
281 'left' => __('Left' , 'auxin-elements' ),
282 'right' => __('Right' , 'auxin-elements' )
283 ),
284 'condition' => array(
285 'burger_menu_location' => 'offcanvas'
286 )
287 )
288 );
289
290 $this->add_control(
291 'burger_toggle_type',
292 array(
293 'label' => __('Mobile Menu Opening Type', 'auxin-elements'),
294 'label_block' => true,
295 'type' => Controls_Manager::SELECT,
296 'default' => 'toggle',
297 'options' => array(
298 'toggle' => __('Toggle' , 'auxin-elements' ),
299 'accordion' => __('Accordion' , 'auxin-elements' )
300 )
301 )
302 );
303
304 $this->end_controls_section();
305
306 /*-----------------------------------------------------------------------------------*/
307 /* Style TAB
308 /*-----------------------------------------------------------------------------------*/
309
310 /* Menu Item Section
311 /*-------------------------------------*/
312
313 $this->start_controls_section(
314 'menu_item_section',
315 array(
316 'label' => __( 'Menu Item', 'auxin-elements' ),
317 'tab' => Controls_Manager::TAB_STYLE
318 )
319 );
320
321 $this->add_responsive_control(
322 'align',
323 array(
324 'label' => __('Text Align', 'auxin-elements'),
325 'type' => Controls_Manager::CHOOSE,
326 'options' => array(
327 'left' => array(
328 'title' => __( 'Left', 'auxin-elements' ),
329 'icon' => 'fa fa-align-left'
330 ),
331 'center' => array(
332 'title' => __( 'Center', 'auxin-elements' ),
333 'icon' => 'fa fa-align-center'
334 ),
335 'right' => array(
336 'title' => __( 'Right', 'auxin-elements' ),
337 'icon' => 'fa fa-align-right'
338 )
339 ),
340 'default' => 'left',
341 'toggle' => true,
342 'selectors' => array(
343 '{{WRAPPER}}' => 'text-align: {{VALUE}}'
344 )
345 )
346 );
347
348 $this->start_controls_tabs( 'item_colors' );
349
350 $this->start_controls_tab(
351 'item_color_normal',
352 array(
353 'label' => __( 'Normal' , 'auxin-elements' )
354 )
355 );
356
357 $this->add_control(
358 'item_color',
359 array(
360 'label' => __( 'Color', 'auxin-elements' ),
361 'type' => Controls_Manager::COLOR,
362 'selectors' => array(
363 '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'color: {{VALUE}};'
364 )
365 )
366 );
367
368 $this->add_group_control(
369 Group_Control_Typography::get_type(),
370 array(
371 'name' => 'menu_item_typo',
372 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
373 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
374 )
375 );
376
377 $this->add_group_control(
378 Group_Control_Text_Shadow::get_type(),
379 [
380 'name' => 'menu_item_text_shadow',
381 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
382 ]
383 );
384
385 $this->add_group_control(
386 Group_Control_Box_Shadow::get_type(),
387 array(
388 'name' => 'item_box_shadow',
389 'selector' => '{{WRAPPER}} .aux-menu-depth-0'
390 )
391 );
392
393 $this->add_group_control(
394 Group_Control_Background::get_type(),
395 array(
396 'name' => 'item_background',
397 'label' => __( 'Background', 'auxin-elements' ),
398 'types' => array( 'classic', 'gradient' ),
399 'selector' => '{{WRAPPER}} .aux-menu-depth-0 '
400 )
401 );
402
403 $this->add_group_control(
404 Group_Control_Border::get_type(),
405 array(
406 'name' => 'item_border',
407 'selector' => '{{WRAPPER}} .aux-menu-depth-0',
408 'separator' => 'none'
409 )
410 );
411
412 $this->add_responsive_control(
413 'item_border_radius',
414 array(
415 'label' => __( 'Border Radius', 'auxin-elements' ),
416 'type' => Controls_Manager::DIMENSIONS,
417 'size_units' => array( 'px', 'em', '%' ),
418 'selectors' => array(
419 '{{WRAPPER}} .aux-menu-depth-0' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
420 ),
421 'allowed_dimensions' => 'all'
422 )
423 );
424
425 $this->end_controls_tab();
426
427 $this->start_controls_tab(
428 'item_color_hover',
429 array(
430 'label' => __( 'Hover' , 'auxin-elements' )
431 )
432 );
433
434 $this->add_control(
435 'item_hover_color',
436 array(
437 'label' => __( 'Color', 'auxin-elements' ),
438 'type' => Controls_Manager::COLOR,
439 'selectors' => array(
440 '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content ' => 'color: {{VALUE}} !important;'
441 )
442 )
443 );
444
445 $this->add_group_control(
446 Group_Control_Typography::get_type(),
447 array(
448 'name' => 'menu_item_typo_hover',
449 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
450 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content',
451 )
452 );
453
454 $this->add_group_control(
455 Group_Control_Text_Shadow::get_type(),
456 [
457 'name' => 'menu_item_text_shadow_hover',
458 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content'
459 ]
460 );
461
462 $this->add_group_control(
463 Group_Control_Box_Shadow::get_type(),
464 array(
465 'name' => 'hover_item_box_shadow',
466 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
467 )
468 );
469
470 $this->add_group_control(
471 Group_Control_Background::get_type(),
472 array(
473 'name' => 'hover_item_background',
474 'label' => __( 'Background', 'auxin-elements' ),
475 'types' => array( 'classic', 'gradient' ),
476 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
477 )
478 );
479
480 $this->add_group_control(
481 Group_Control_Border::get_type(),
482 array(
483 'name' => 'item_hover_border',
484 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover',
485 'separator' => 'none'
486 )
487 );
488
489 $this->add_responsive_control(
490 'item_hover_border_radius',
491 array(
492 'label' => __( 'Border Radius', 'auxin-elements' ),
493 'type' => Controls_Manager::DIMENSIONS,
494 'size_units' => array( 'px', 'em', '%' ),
495 'selectors' => array(
496 '{{WRAPPER}} .aux-menu-depth-0.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
497 ),
498 'allowed_dimensions' => 'all',
499 )
500 );
501
502
503 $this->end_controls_tab();
504
505 $this->end_controls_tabs();
506
507
508 $this->add_responsive_control(
509 'item_padding',
510 array(
511 'label' => __( 'Padding', 'auxin-elements' ),
512 'type' => Controls_Manager::DIMENSIONS,
513 'size_units' => array( 'px', '%' ),
514 'selectors' => array(
515 '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
516 ),
517 'separator' => 'before'
518 )
519 );
520
521 $this->add_responsive_control(
522 'item_margin',
523 array(
524 'label' => __( 'Margin', 'auxin-elements' ),
525 'type' => Controls_Manager::DIMENSIONS,
526 'size_units' => array( 'px', '%' ),
527 'selectors' => array(
528 '{{WRAPPER}} .aux-menu-depth-0' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
529 ),
530 'seperator' => 'after'
531 )
532 );
533
534 $this->end_controls_section();
535
536 /* Menu item - Current Section
537 /*-------------------------------------*/
538
539 $this->start_controls_section(
540 'menu_item_current_section',
541 array(
542 'label' => __( 'Menu Item - Selected', 'auxin-elements' ),
543 'tab' => Controls_Manager::TAB_STYLE
544 )
545 );
546
547 $this->add_control(
548 'menu_item_current_color',
549 array(
550 'label' => __( 'Color', 'auxin-elements' ),
551 'type' => Controls_Manager::COLOR,
552 'selectors' => array(
553 '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};',
554 ),
555 )
556 );
557
558 $this->add_group_control(
559 Group_Control_Typography::get_type(),
560 array(
561 'name' => 'menu_item_current_typography',
562 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
563 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
564 )
565 );
566
567 $this->add_group_control(
568 Group_Control_Text_Shadow::get_type(),
569 [
570 'name' => 'menu_item_current_text_shadow',
571 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
572 ]
573 );
574
575 $this->add_group_control(
576 Group_Control_Box_Shadow::get_type(),
577 array(
578 'name' => 'menu_item_current_box_shadow',
579 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
580 )
581 );
582
583 $this->add_group_control(
584 Group_Control_Background::get_type(),
585 array(
586 'name' => 'menu_item_current_background',
587 'label' => __( 'Background', 'auxin-elements' ),
588 'types' => array( 'classic', 'gradient' ),
589 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a '
590 )
591 );
592
593 $this->end_controls_section();
594
595
596 /* Submenu Section
597 /*-------------------------------------*/
598
599 $this->start_controls_section(
600 'submenu_style_section',
601 array(
602 'label' => __( 'Submenu', 'auxin-elements' ),
603 'tab' => Controls_Manager::TAB_STYLE
604 )
605 );
606
607 $this->add_control(
608 'submenu_skin',
609 array(
610 'label' => __('Skin','auxin-elements' ),
611 'type' => 'aux-visual-select',
612 'style_items' => 'max-width:45%;',
613 'options' => array(
614 'classic' => array(
615 'label' => __('Paradox', 'auxin-elements' ),
616 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-1.svg'
617 ),
618 'classic-center' => array(
619 'label' => __( 'Classic', 'auxin-elements' ),
620 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-2.svg'
621 ),
622 'dash-divided' => array(
623 'label' => __( 'Dark Transparent', 'auxin-elements' ),
624 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-5.svg'
625 ),
626 'divided' => array(
627 'label' => __( 'Divided', 'auxin-elements' ),
628 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-3.svg'
629 ),
630 'minimal-center' => array(
631 'label' => __( 'Center Paradox', 'auxin-elements' ),
632 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-4.svg'
633 ),
634 'modern' => array(
635 'label' => __( 'Modern Paradox', 'auxin-elements' ),
636 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-6.svg'
637 )
638 ),
639 'default' => 'classic',
640 'separator' => 'after'
641 )
642 );
643
644 $this->add_control(
645 'submenu_anim',
646 array(
647 'label' => __('Animation Effect','auxin-elements' ),
648 'type' => 'aux-visual-select',
649 'style_items' => 'max-width:100%;',
650 'options' => array(
651 'none' => array(
652 'label' => __( 'None', 'auxin-elements' ),
653 'video_src' => AUXIN_URL . 'images/visual-select/videos/NoFade.webm webm'
654 ),
655 'fade' => array(
656 'label' => __( 'Fade', 'auxin-elements' ),
657 'video_src' => AUXIN_URL . 'images/visual-select/videos/Fade.webm webm'
658 ),
659 'slide-up' => array(
660 'label' => __( 'Fade and move', 'auxin-elements' ),
661 'video_src' => AUXIN_URL . 'images/visual-select/videos/FadeAndMove.webm webm'
662 )
663 ),
664 'default' => 'none',
665 'seperator' => 'after'
666 )
667 );
668
669 $this->start_controls_tabs( 'sub_background_tab' );
670
671 $this->start_controls_tab(
672 'submenu_style_normal',
673 array(
674 'label' => __( 'Normal' , 'auxin-elements' )
675 )
676 );
677
678 $this->add_group_control(
679 Group_Control_Background::get_type(),
680 array(
681 'name' => 'sub_background',
682 'label' => __( 'Background', 'auxin-elements' ),
683 'types' => array( 'classic', 'gradient' ),
684 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu'
685 )
686 );
687
688 $this->add_group_control(
689 Group_Control_Box_Shadow::get_type(),
690 array(
691 'name' => 'sub_box_shadow',
692 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu'
693 )
694 );
695
696 $this->add_responsive_control(
697 'sub_border_radius',
698 array(
699 'label' => __( 'Border Radius', 'auxin-elements' ),
700 'type' => Controls_Manager::DIMENSIONS,
701 'size_units' => array( 'px', 'em', '%' ),
702 'selectors' => array(
703 '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
704 ),
705 'allowed_dimensions' => 'all',
706 )
707 );
708
709 $this->add_group_control(
710 Group_Control_Border::get_type(),
711 array(
712 'name' => 'sub_border',
713 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu',
714 'separator' => 'none'
715 )
716 );
717
718 $this->end_controls_tab();
719
720 $this->start_controls_tab(
721 'submenu_style_hover',
722 array(
723 'label' => __( 'Hover' , 'auxin-elements' )
724 )
725 );
726
727 $this->add_group_control(
728 Group_Control_Background::get_type(),
729 array(
730 'name' => 'hover_sub_background',
731 'label' => __( 'Background', 'auxin-elements' ),
732 'types' => array( 'classic', 'gradient' ),
733 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover'
734 )
735 );
736
737 $this->add_group_control(
738 Group_Control_Box_Shadow::get_type(),
739 array(
740 'name' => 'hover_sub_box_shadow',
741 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover'
742 )
743 );
744
745 $this->add_responsive_control(
746 'sub_hover_border_radius',
747 array(
748 'label' => __( 'Border Radius', 'auxin-elements' ),
749 'type' => Controls_Manager::DIMENSIONS,
750 'size_units' => array( 'px', 'em', '%' ),
751 'selectors' => array(
752 '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
753 ),
754 'allowed_dimensions' => 'all',
755 )
756 );
757
758 $this->add_group_control(
759 Group_Control_Border::get_type(),
760 array(
761 'name' => 'sub_hover_border',
762 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover',
763 'separator' => 'none'
764 )
765 );
766
767 $this->end_controls_tab();
768
769 $this->end_controls_tabs();
770
771 $this->end_controls_section();
772
773
774 /* SubMenu Item Section
775 /*-------------------------------------*/
776
777 $this->start_controls_section(
778 'submenu_item_section',
779 array(
780 'label' => __( 'Submenu Item', 'auxin-elements' ),
781 'tab' => Controls_Manager::TAB_STYLE
782 )
783 );
784
785 $this->start_controls_tabs( 'sub_item_colors' );
786
787 $this->start_controls_tab(
788 'sub_item_color_normal',
789 array(
790 'label' => __( 'Normal' , 'auxin-elements' )
791 )
792 );
793
794 $this->add_control(
795 'sub_item_color',
796 array(
797 'label' => __( 'Color', 'auxin-elements' ),
798 'type' => Controls_Manager::COLOR,
799 'selectors' => array(
800 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'color: {{VALUE}} !important;',
801 ),
802 'seperartor' => 'after'
803 )
804 );
805
806 $this->add_group_control(
807 Group_Control_Typography::get_type(),
808 array(
809 'name' => 'menu_sub_item_typo',
810 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
811 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item',
812 )
813 );
814
815 $this->add_group_control(
816 Group_Control_Text_Shadow::get_type(),
817 [
818 'name' => 'sub_item_text_shadow',
819 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
820 ]
821 );
822
823 $this->add_group_control(
824 Group_Control_Box_Shadow::get_type(),
825 array(
826 'name' => 'sub_item_box_shadow',
827 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
828 )
829 );
830
831 $this->add_group_control(
832 Group_Control_Background::get_type(),
833 array(
834 'name' => 'sub_item_background',
835 'label' => __( 'Background', 'auxin-elements' ),
836 'types' => array( 'classic', 'gradient' ),
837 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
838 )
839 );
840
841
842 $this->add_responsive_control(
843 'sub_item_border_radius',
844 array(
845 'label' => __( 'Border Radius', 'auxin-elements' ),
846 'type' => Controls_Manager::DIMENSIONS,
847 'size_units' => array( 'px', 'em', '%' ),
848 'selectors' => array(
849 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
850 ),
851 'allowed_dimensions' => 'all',
852 )
853 );
854
855 $this->add_group_control(
856 Group_Control_Border::get_type(),
857 array(
858 'name' => 'sub_item_border',
859 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content',
860 'separator' => 'none'
861 )
862 );
863
864 $this->end_controls_tab();
865
866 $this->start_controls_tab(
867 'sub_item_color_hover',
868 array(
869 'label' => __( 'Hover' , 'auxin-elements' )
870 )
871 );
872
873 $this->add_control(
874 'sub_item_hover_color',
875 array(
876 'label' => __( 'Color', 'auxin-elements' ),
877 'type' => Controls_Manager::COLOR,
878 'selectors' => array(
879 '{{WRAPPER}} .aux-submenu .aux-menu-item.aux-hover .aux-item-content' => 'color: {{VALUE}} !important;'
880 ),
881 'seperartor' => 'after'
882 )
883 );
884
885 $this->add_group_control(
886 Group_Control_Typography::get_type(),
887 array(
888 'name' => 'menu_sub_item_typo_hover',
889 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
890 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item.aux-hover',
891 )
892 );
893
894 $this->add_group_control(
895 Group_Control_Text_Shadow::get_type(),
896 [
897 'name' => 'hover_sub_item_text_shadow',
898 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
899 ]
900 );
901
902 $this->add_group_control(
903 Group_Control_Box_Shadow::get_type(),
904 array(
905 'name' => 'hover_sub_item_box_shadow',
906 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
907 )
908 );
909
910 $this->add_group_control(
911 Group_Control_Background::get_type(),
912 array(
913 'name' => 'hover_sub_item_background',
914 'label' => __( 'Background', 'auxin-elements' ),
915 'types' => array( 'classic', 'gradient' ),
916 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
917 )
918 );
919
920 $this->add_responsive_control(
921 'sub_item_hover_border_radius',
922 array(
923 'label' => __( 'Border Radius', 'auxin-elements' ),
924 'type' => Controls_Manager::DIMENSIONS,
925 'size_units' => array( 'px', 'em', '%' ),
926 'selectors' => array(
927 '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
928 ),
929 'allowed_dimensions' => 'all',
930 )
931 );
932
933 $this->add_group_control(
934 Group_Control_Border::get_type(),
935 array(
936 'name' => 'sub_item_hover_border',
937 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content',
938 'separator' => 'none'
939 )
940 );
941
942 $this->end_controls_tab();
943
944 $this->end_controls_tabs();
945
946
947 $this->add_responsive_control(
948 'sub_item_padding',
949 array(
950 'label' => __( 'Padding', 'auxin-elements' ),
951 'type' => Controls_Manager::DIMENSIONS,
952 'size_units' => array( 'px', '%' ),
953 'selectors' => array(
954 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
955 ),
956 'separator' => 'before'
957 )
958 );
959
960 $this->add_responsive_control(
961 'sub_item_margin',
962 array(
963 'label' => __( 'Margin', 'auxin-elements' ),
964 'type' => Controls_Manager::DIMENSIONS,
965 'size_units' => array( 'px', '%' ),
966 'selectors' => array(
967 '{{WRAPPER}} .aux-submenu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
968 ),
969 'seperator' => 'after'
970 )
971 );
972
973 $this->end_controls_section();
974
975 /* Burger Button Section
976 /*-------------------------------------*/
977
978 $this->start_controls_section(
979 'burger_section',
980 array(
981 'label' => __( 'Burger Button', 'auxin-elements' ),
982 'tab' => Controls_Manager::TAB_STYLE
983 )
984 );
985
986 $this->add_control(
987 'burger_type',
988 array(
989 'label' => __( 'Type', 'auxin-elements' ),
990 'type' => Controls_Manager::SELECT,
991 'default' => 'default',
992 'options' => array(
993 'default' => __( 'Default', 'auxin-elements' ),
994 'custom' => __( 'Custom', 'auxin-elements' ),
995 ),
996 )
997 );
998
999 $this->start_controls_tabs(
1000 'burger_color',
1001 array(
1002 'condition' => array(
1003 'burger_type' => 'default'
1004 )
1005 )
1006 );
1007
1008 $this->start_controls_tab(
1009 'burger_color_normal',
1010 array(
1011 'label' => __( 'Normal' , 'auxin-elements' )
1012 )
1013 );
1014
1015 $this->add_control(
1016 'burger_btn_color',
1017 array(
1018 'label' => __( 'Color', 'auxin-elements' ),
1019 'type' => Controls_Manager::COLOR,
1020 'selectors' => array(
1021 '{{WRAPPER}} .aux-burger:before, {{WRAPPER}} .aux-burger:after, {{WRAPPER}} .aux-burger .mid-line' => 'border-color: {{VALUE}} !important;',
1022 ),
1023 'seperartor' => 'after'
1024 )
1025 );
1026
1027 $this->end_controls_tab();
1028
1029 $this->start_controls_tab(
1030 'burger_color_hover',
1031 array(
1032 'label' => __( 'Hover' , 'auxin-elements' )
1033 )
1034 );
1035
1036 $this->add_control(
1037 'burger_btn_hover_color',
1038 array(
1039 'label' => __( 'Color', 'auxin-elements' ),
1040 'type' => Controls_Manager::COLOR,
1041 'selectors' => array(
1042 '{{WRAPPER}} .aux-burger:hover:before, {{WRAPPER}} .aux-burger:hover:after, {{WRAPPER}} .aux-burger:hover .mid-line' => 'border-color: {{VALUE}} !important;',
1043 ),
1044 'seperartor' => 'after'
1045 )
1046 );
1047
1048 $this->end_controls_tab();
1049
1050 $this->end_controls_tabs();
1051
1052 $this->add_control(
1053 'burger_btn_style',
1054 array(
1055 'label' => __('Burger Button Style','auxin-elements' ),
1056 'type' => 'aux-visual-select',
1057 'style_items' => 'max-width:45%;',
1058 'options' => array(
1059 'aux-lite-large' => array(
1060 'label' => __( 'Expandable under top header', 'auxin-elements' ),
1061 'image' => AUXIN_URL . 'images/visual-select/burger-lite-large.svg'
1062 ),
1063 'aux-regular-large' => array(
1064 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1065 'image' => AUXIN_URL . 'images/visual-select/burger-regular-large.svg'
1066 ),
1067 'aux-thick-large' => array(
1068 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1069 'image' => AUXIN_URL . 'images/visual-select/burger-thick-large.svg'
1070 ),
1071 'aux-lite-medium' => array(
1072 'label' => __( 'FullScreen on entire page', 'auxin-elements' ),
1073 'image' => AUXIN_URL . 'images/visual-select/burger-lite-medium.svg'
1074 ),
1075 'aux-regular-medium' => array(
1076 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1077 'image' => AUXIN_URL . 'images/visual-select/burger-regular-medium.svg'
1078 ),
1079 'aux-thick-medium' => array(
1080 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1081 'image' => AUXIN_URL . 'images/visual-select/burger-thick-medium.svg'
1082 ),
1083 'aux-lite-small' => array(
1084 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1085 'image' => AUXIN_URL . 'images/visual-select/burger-lite-small.svg'
1086 ),
1087 'aux-regular-small' => array(
1088 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1089 'image' => AUXIN_URL . 'images/visual-select/burger-regular-small.svg'
1090 ),
1091 'aux-thick-small' => array(
1092 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1093 'image' => AUXIN_URL . 'images/visual-select/burger-thick-small.svg'
1094 )
1095 ),
1096 'default' => 'aux-lite-small',
1097 'seperator' => 'before',
1098 'condition' => array(
1099 'burger_type' => 'default'
1100 )
1101 )
1102 );
1103
1104 $this->add_control(
1105 'burger_custom',
1106 array(
1107 'label' => '',
1108 'type' => Controls_Manager::CODE,
1109 'default' => '',
1110 'placeholder' => __( 'Enter inline SVG content here', 'auxin-elements' ),
1111 'show_label' => false,
1112 'condition' => array(
1113 'burger_type' => 'custom'
1114 )
1115 )
1116 );
1117
1118 $this->end_controls_section();
1119
1120 /* Full Screen Menu Section
1121 /*-------------------------------------*/
1122
1123 $this->start_controls_section(
1124 'fullscr_section',
1125 array(
1126 'label' => __( 'Fullscreen Menu', 'auxin-elements' ),
1127 'tab' => Controls_Manager::TAB_STYLE,
1128 'condition' => array(
1129 'burger_menu_location' => 'overlay'
1130 )
1131 )
1132 );
1133
1134 $this->add_group_control(
1135 Group_Control_Background::get_type(),
1136 array(
1137 'name' => 'fullscr_bg',
1138 'label' => __( 'Background', 'auxin-elements' ),
1139 'types' => array( 'classic', 'gradient' ),
1140 'selector' => '{{WRAPPER}} .aux-fs-popup'
1141 )
1142 );
1143
1144 $this->start_controls_tabs( 'fullscr_item_colors' );
1145
1146 $this->start_controls_tab(
1147 'fullscr_item_color_normal',
1148 array(
1149 'label' => __( 'Normal' , 'auxin-elements' )
1150 )
1151 );
1152
1153 $this->add_control(
1154 'fullscr_item_color',
1155 array(
1156 'label' => __( 'Color', 'auxin-elements' ),
1157 'type' => Controls_Manager::COLOR,
1158 'selectors' => array(
1159 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}};',
1160 ),
1161 'seperartor' => 'after'
1162 )
1163 );
1164
1165 $this->add_group_control(
1166 Group_Control_Typography::get_type(),
1167 array(
1168 'name' => 'fullscr_menu_item_typo',
1169 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1170 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content',
1171 )
1172 );
1173
1174 $this->add_group_control(
1175 Group_Control_Text_Shadow::get_type(),
1176 [
1177 'name' => 'fullscr_item_text_shadow',
1178 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content'
1179 ]
1180 );
1181
1182 $this->add_group_control(
1183 Group_Control_Box_Shadow::get_type(),
1184 array(
1185 'name' => 'fullscr_item_box_shadow',
1186 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item'
1187 )
1188 );
1189
1190 $this->add_group_control(
1191 Group_Control_Background::get_type(),
1192 array(
1193 'name' => 'fullscr_item_background',
1194 'label' => __( 'Background', 'auxin-elements' ),
1195 'types' => array( 'classic', 'gradient' ),
1196 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1197 )
1198 );
1199
1200 $this->add_responsive_control(
1201 'fullscr_item_border_radius',
1202 array(
1203 'label' => __( 'Border Radius', 'auxin-elements' ),
1204 'type' => Controls_Manager::DIMENSIONS,
1205 'size_units' => array( 'px', 'em', '%' ),
1206 'selectors' => array(
1207 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1208 ),
1209 'allowed_dimensions' => 'all',
1210 )
1211 );
1212
1213 $this->add_group_control(
1214 Group_Control_Border::get_type(),
1215 array(
1216 'name' => 'fullscr_item_border',
1217 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item',
1218 'separator' => 'none'
1219 )
1220 );
1221
1222 $this->end_controls_tab();
1223
1224 $this->start_controls_tab(
1225 'fullscr_item_color_hover',
1226 array(
1227 'label' => __( 'Hover' , 'auxin-elements' )
1228 )
1229 );
1230
1231 $this->add_control(
1232 'fullscr_item_hover_color',
1233 array(
1234 'label' => __( 'Color', 'auxin-elements' ),
1235 'type' => Controls_Manager::COLOR,
1236 'selectors' => array(
1237 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}} !important;'
1238 ),
1239 'seperartor' => 'after'
1240 )
1241 );
1242
1243 $this->add_group_control(
1244 Group_Control_Typography::get_type(),
1245 array(
1246 'name' => 'fullscr_menu_item_typo_hover',
1247 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1248 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1249 )
1250 );
1251
1252 $this->add_group_control(
1253 Group_Control_Text_Shadow::get_type(),
1254 [
1255 'name' => 'fullscr_hover_item_text_shadow',
1256 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content'
1257 ]
1258 );
1259
1260 $this->add_group_control(
1261 Group_Control_Box_Shadow::get_type(),
1262 array(
1263 'name' => 'fullscr_hover_item_box_shadow',
1264 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1265 )
1266 );
1267
1268 $this->add_group_control(
1269 Group_Control_Background::get_type(),
1270 array(
1271 'name' => 'fullscr_hover_item_background',
1272 'label' => __( 'Background', 'auxin-elements' ),
1273 'types' => array( 'classic', 'gradient' ),
1274 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1275 )
1276 );
1277
1278 $this->add_responsive_control(
1279 'fullscr_item_hover_border_radius',
1280 array(
1281 'label' => __( 'Border Radius', 'auxin-elements' ),
1282 'type' => Controls_Manager::DIMENSIONS,
1283 'size_units' => array( 'px', 'em', '%' ),
1284 'selectors' => array(
1285 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1286 ),
1287 'allowed_dimensions' => 'all',
1288 'separator' => 'after'
1289 )
1290 );
1291
1292 $this->add_group_control(
1293 Group_Control_Border::get_type(),
1294 array(
1295 'name' => 'fullscr_item_hover_border',
1296 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover',
1297 'separator' => 'none'
1298 )
1299 );
1300
1301 $this->end_controls_tab();
1302
1303 $this->end_controls_tabs();
1304
1305 $this->add_responsive_control(
1306 'fullscr_item_padding',
1307 array(
1308 'label' => __( 'Padding', 'auxin-elements' ),
1309 'type' => Controls_Manager::DIMENSIONS,
1310 'size_units' => array( 'px', '%' ),
1311 'selectors' => array(
1312 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1313 ),
1314 'separator' => 'before'
1315 )
1316 );
1317
1318 $this->add_responsive_control(
1319 'fullscr_item_margin',
1320 array(
1321 'label' => __( 'Margin', 'auxin-elements' ),
1322 'type' => Controls_Manager::DIMENSIONS,
1323 'size_units' => array( 'px', '%' ),
1324 'selectors' => array(
1325 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1326 ),
1327 'seperator' => 'after'
1328 )
1329 );
1330
1331 $this->add_responsive_control(
1332 'fullscr_align',
1333 array(
1334 'label' => __('Text Align','auxin-elements'),
1335 'type' => Controls_Manager::CHOOSE,
1336 'devices' => array( 'desktop', 'mobile' ),
1337 'options' => array(
1338 'left' => array(
1339 'title' => __( 'Left', 'auxin-elements' ),
1340 'icon' => 'fa fa-align-left',
1341 ),
1342 'center' => array(
1343 'title' => __( 'Center', 'auxin-elements' ),
1344 'icon' => 'fa fa-align-center',
1345 ),
1346 'right' => array(
1347 'title' => __( 'Right', 'auxin-elements' ),
1348 'icon' => 'fa fa-align-right',
1349 ),
1350 ),
1351 'default' => 'left',
1352 'toggle' => true,
1353 'selectors' => array(
1354 '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
1355 ),
1356 'separator' => 'after'
1357 )
1358 );
1359
1360 $this->add_control(
1361 'fullscr_current_item_color',
1362 array(
1363 'label' => __( 'Color', 'auxin-elements' ),
1364 'type' => Controls_Manager::COLOR,
1365 'selectors' => array(
1366 '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};'
1367 )
1368 )
1369 );
1370
1371 $this->add_group_control(
1372 Group_Control_Typography::get_type(),
1373 array(
1374 'name' => 'fullscr_current_item_typography',
1375 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1376 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1377 )
1378 );
1379
1380 $this->add_group_control(
1381 Group_Control_Text_Shadow::get_type(),
1382 [
1383 'name' => 'fullscr_current_item_text_shadow',
1384 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1385 ]
1386 );
1387
1388 $this->end_controls_section();
1389
1390 }
1391
1392 /**
1393 * Render MenuBox widget output on the frontend.
1394 *
1395 * Written in PHP and used to generate the final HTML.
1396 *
1397 * @since 1.0.0
1398 * @access protected
1399 */
1400 protected function render() {
1401 $settings = $this->get_settings_for_display();
1402
1403 if ( ! isset( $settings['menu_slug'] ) ) {
1404 return _e( 'There are no menus in your site.', 'auxin-elements' ) ;
1405 }
1406
1407
1408 $offcanvas_output = '';
1409 $fullscreen_output = '';
1410 $toggle_bar_output = '';
1411
1412 $indicator = auxin_is_true( $settings['indicator'] );
1413 $splitter = auxin_is_true( $settings['splitter'] );
1414
1415
1416 $menu_class = '';
1417 $menu_class .= ' aux-skin-' . $settings['submenu_skin'] ;
1418 $menu_class .= 'none' !== $settings['submenu_anim'] ? ' aux-' . $settings['submenu_anim'] . '-nav' : '';
1419 $menu_class .= $indicator ? ' aux-with-indicator' : '';
1420 $menu_class .= $splitter ? ' aux-with-splitter' : '';
1421
1422
1423 $mobile_menu_target = '.elementor-element-' . $this->get_id();
1424
1425 switch( $settings['burger_menu_location'] ) {
1426 case 'overlay':
1427 $fullscreen_output = '<section class="aux-fs-popup aux-fs-menu-layout-center aux-indicator">';
1428 $fullscreen_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1429 $fullscreen_output .= '<div class="aux-fs-menu"></div>';
1430 $fullscreen_output .= '</section>';
1431 $mobile_menu_target .= ' .aux-fs-popup .aux-fs-menu';
1432 break;
1433
1434 case 'offcanvas':
1435 $offcanvas_output = '<section class="aux-offcanvas-menu aux-pin-' . $settings['offcanvas_align'] . '">';
1436 $offcanvas_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1437 $offcanvas_output .= '<div class="offcanvas-header"></div>';
1438 $offcanvas_output .= '<div class="offcanvas-content"></div>';
1439 $offcanvas_output .= '<div class="offcanvas-footer"></div>';
1440 $offcanvas_output .= '</section>';
1441 $mobile_menu_target .= ' .aux-offcanvas-menu .offcanvas-content';
1442 break;
1443
1444 case 'toggle-bar':
1445 $toggle_bar_output = '<div class="aux-toggle-menu-bar"></div>';
1446 $mobile_menu_target .= ' .aux-toggle-menu-bar';
1447 break;
1448
1449 default:
1450
1451 }
1452
1453 printf( '<div class="aux-elementor-header-menu aux-nav-menu-element aux-nav-menu-element-%s">', $this->get_id() );
1454
1455 if ( 'default' === $settings['burger_type'] ) {
1456 $burger_content = '<div class="aux-burger ' . $settings['burger_btn_style'] . '"><span class="mid-line"></span></div>';
1457 } else {
1458 $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1459 }
1460
1461 $burger_btn_output = printf( '<div class="aux-burger-box" data-target-panel="%s" data-target-content="%s">%s</div>',
1462 $settings['burger_menu_location'],
1463 '.elementor-element-' . $this->get_id() . ' .aux-master-menu',
1464 $burger_content
1465 );
1466
1467 $breakpoint = 'custom' === $settings['display_burger'] ? $settings['breakpoint']['size'] : $settings['display_burger'];
1468
1469 wp_nav_menu( array(
1470 'container_id' => 'master-menu-elementor-'. $this->get_id(),
1471 'menu' => $settings['menu_slug'],
1472 'direction' => 'burger' === $settings['type'] ? null : $settings['type'],
1473 'mobile_under' => 'burger' === $settings['type'] ? 7000 : $breakpoint,
1474 'mobile_menu_type' => $settings['burger_toggle_type'],
1475 'mobile_menu_target' => $mobile_menu_target,
1476 'theme_location' => 'element',
1477 'extra_class' => esc_attr( $menu_class ),
1478 'fallback_cb' => 'wp_page_menu'
1479 ));
1480
1481 echo $offcanvas_output;
1482 echo $fullscreen_output;
1483 echo $toggle_bar_output;
1484
1485 echo '</div>';
1486
1487 if ( 'burger' !== $settings['type'] ) {
1488 printf( '<style>@media only screen and (min-width: %spx) { .elementor-element-%s .aux-burger-box { display: none } }</style>', $breakpoint + 1, $this->get_id() );
1489 }
1490
1491 }
1492
1493 }
1494