PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.6.0
Shortcodes and extra features for Phlox theme v2.6.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 / 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
1505 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->add_control(
1119 'burger_offcanvas_menu_bg_color',
1120 array(
1121 'label' => __( 'Off canvas menu background color', 'auxin-elements' ),
1122 'type' => Controls_Manager::COLOR,
1123 'selectors' => array(
1124 '{{WRAPPER}} .aux-offcanvas-menu' => 'background-color: {{VALUE}};',
1125 ),
1126 )
1127 );
1128
1129 $this->end_controls_section();
1130
1131 /* Full Screen Menu Section
1132 /*-------------------------------------*/
1133
1134 $this->start_controls_section(
1135 'fullscr_section',
1136 array(
1137 'label' => __( 'Fullscreen Menu', 'auxin-elements' ),
1138 'tab' => Controls_Manager::TAB_STYLE,
1139 'condition' => array(
1140 'burger_menu_location' => 'overlay'
1141 )
1142 )
1143 );
1144
1145 $this->add_group_control(
1146 Group_Control_Background::get_type(),
1147 array(
1148 'name' => 'fullscr_bg',
1149 'label' => __( 'Background', 'auxin-elements' ),
1150 'types' => array( 'classic', 'gradient' ),
1151 'selector' => '{{WRAPPER}} .aux-fs-popup'
1152 )
1153 );
1154
1155 $this->start_controls_tabs( 'fullscr_item_colors' );
1156
1157 $this->start_controls_tab(
1158 'fullscr_item_color_normal',
1159 array(
1160 'label' => __( 'Normal' , 'auxin-elements' )
1161 )
1162 );
1163
1164 $this->add_control(
1165 'fullscr_item_color',
1166 array(
1167 'label' => __( 'Color', 'auxin-elements' ),
1168 'type' => Controls_Manager::COLOR,
1169 'selectors' => array(
1170 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}};',
1171 ),
1172 'seperartor' => 'after'
1173 )
1174 );
1175
1176 $this->add_group_control(
1177 Group_Control_Typography::get_type(),
1178 array(
1179 'name' => 'fullscr_menu_item_typo',
1180 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1181 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content',
1182 )
1183 );
1184
1185 $this->add_group_control(
1186 Group_Control_Text_Shadow::get_type(),
1187 [
1188 'name' => 'fullscr_item_text_shadow',
1189 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content'
1190 ]
1191 );
1192
1193 $this->add_group_control(
1194 Group_Control_Box_Shadow::get_type(),
1195 array(
1196 'name' => 'fullscr_item_box_shadow',
1197 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item'
1198 )
1199 );
1200
1201 $this->add_group_control(
1202 Group_Control_Background::get_type(),
1203 array(
1204 'name' => 'fullscr_item_background',
1205 'label' => __( 'Background', 'auxin-elements' ),
1206 'types' => array( 'classic', 'gradient' ),
1207 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1208 )
1209 );
1210
1211 $this->add_responsive_control(
1212 'fullscr_item_border_radius',
1213 array(
1214 'label' => __( 'Border Radius', 'auxin-elements' ),
1215 'type' => Controls_Manager::DIMENSIONS,
1216 'size_units' => array( 'px', 'em', '%' ),
1217 'selectors' => array(
1218 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1219 ),
1220 'allowed_dimensions' => 'all',
1221 )
1222 );
1223
1224 $this->add_group_control(
1225 Group_Control_Border::get_type(),
1226 array(
1227 'name' => 'fullscr_item_border',
1228 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item',
1229 'separator' => 'none'
1230 )
1231 );
1232
1233 $this->end_controls_tab();
1234
1235 $this->start_controls_tab(
1236 'fullscr_item_color_hover',
1237 array(
1238 'label' => __( 'Hover' , 'auxin-elements' )
1239 )
1240 );
1241
1242 $this->add_control(
1243 'fullscr_item_hover_color',
1244 array(
1245 'label' => __( 'Color', 'auxin-elements' ),
1246 'type' => Controls_Manager::COLOR,
1247 'selectors' => array(
1248 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}} !important;'
1249 ),
1250 'seperartor' => 'after'
1251 )
1252 );
1253
1254 $this->add_group_control(
1255 Group_Control_Typography::get_type(),
1256 array(
1257 'name' => 'fullscr_menu_item_typo_hover',
1258 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1259 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1260 )
1261 );
1262
1263 $this->add_group_control(
1264 Group_Control_Text_Shadow::get_type(),
1265 [
1266 'name' => 'fullscr_hover_item_text_shadow',
1267 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content'
1268 ]
1269 );
1270
1271 $this->add_group_control(
1272 Group_Control_Box_Shadow::get_type(),
1273 array(
1274 'name' => 'fullscr_hover_item_box_shadow',
1275 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1276 )
1277 );
1278
1279 $this->add_group_control(
1280 Group_Control_Background::get_type(),
1281 array(
1282 'name' => 'fullscr_hover_item_background',
1283 'label' => __( 'Background', 'auxin-elements' ),
1284 'types' => array( 'classic', 'gradient' ),
1285 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1286 )
1287 );
1288
1289 $this->add_responsive_control(
1290 'fullscr_item_hover_border_radius',
1291 array(
1292 'label' => __( 'Border Radius', 'auxin-elements' ),
1293 'type' => Controls_Manager::DIMENSIONS,
1294 'size_units' => array( 'px', 'em', '%' ),
1295 'selectors' => array(
1296 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1297 ),
1298 'allowed_dimensions' => 'all',
1299 'separator' => 'after'
1300 )
1301 );
1302
1303 $this->add_group_control(
1304 Group_Control_Border::get_type(),
1305 array(
1306 'name' => 'fullscr_item_hover_border',
1307 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover',
1308 'separator' => 'none'
1309 )
1310 );
1311
1312 $this->end_controls_tab();
1313
1314 $this->end_controls_tabs();
1315
1316 $this->add_responsive_control(
1317 'fullscr_item_padding',
1318 array(
1319 'label' => __( 'Padding', 'auxin-elements' ),
1320 'type' => Controls_Manager::DIMENSIONS,
1321 'size_units' => array( 'px', '%' ),
1322 'selectors' => array(
1323 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1324 ),
1325 'separator' => 'before'
1326 )
1327 );
1328
1329 $this->add_responsive_control(
1330 'fullscr_item_margin',
1331 array(
1332 'label' => __( 'Margin', 'auxin-elements' ),
1333 'type' => Controls_Manager::DIMENSIONS,
1334 'size_units' => array( 'px', '%' ),
1335 'selectors' => array(
1336 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1337 ),
1338 'seperator' => 'after'
1339 )
1340 );
1341
1342 $this->add_responsive_control(
1343 'fullscr_align',
1344 array(
1345 'label' => __('Text Align','auxin-elements'),
1346 'type' => Controls_Manager::CHOOSE,
1347 'devices' => array( 'desktop', 'mobile' ),
1348 'options' => array(
1349 'left' => array(
1350 'title' => __( 'Left', 'auxin-elements' ),
1351 'icon' => 'fa fa-align-left',
1352 ),
1353 'center' => array(
1354 'title' => __( 'Center', 'auxin-elements' ),
1355 'icon' => 'fa fa-align-center',
1356 ),
1357 'right' => array(
1358 'title' => __( 'Right', 'auxin-elements' ),
1359 'icon' => 'fa fa-align-right',
1360 ),
1361 ),
1362 'default' => 'left',
1363 'toggle' => true,
1364 'selectors' => array(
1365 '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
1366 ),
1367 'separator' => 'after'
1368 )
1369 );
1370
1371 $this->add_control(
1372 'fullscr_current_item_color',
1373 array(
1374 'label' => __( 'Color', 'auxin-elements' ),
1375 'type' => Controls_Manager::COLOR,
1376 'selectors' => array(
1377 '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};'
1378 )
1379 )
1380 );
1381
1382 $this->add_group_control(
1383 Group_Control_Typography::get_type(),
1384 array(
1385 'name' => 'fullscr_current_item_typography',
1386 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1387 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1388 )
1389 );
1390
1391 $this->add_group_control(
1392 Group_Control_Text_Shadow::get_type(),
1393 [
1394 'name' => 'fullscr_current_item_text_shadow',
1395 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1396 ]
1397 );
1398
1399 $this->end_controls_section();
1400
1401 }
1402
1403 /**
1404 * Render MenuBox widget output on the frontend.
1405 *
1406 * Written in PHP and used to generate the final HTML.
1407 *
1408 * @since 1.0.0
1409 * @access protected
1410 */
1411 protected function render() {
1412 $settings = $this->get_settings_for_display();
1413
1414 if ( ! isset( $settings['menu_slug'] ) ) {
1415 return _e( 'There are no menus in your site.', 'auxin-elements' ) ;
1416 }
1417
1418
1419 $offcanvas_output = '';
1420 $fullscreen_output = '';
1421 $toggle_bar_output = '';
1422
1423 $indicator = auxin_is_true( $settings['indicator'] );
1424 $splitter = auxin_is_true( $settings['splitter'] );
1425
1426
1427 $menu_class = '';
1428 $menu_class .= ' aux-skin-' . $settings['submenu_skin'] ;
1429 $menu_class .= 'none' !== $settings['submenu_anim'] ? ' aux-' . $settings['submenu_anim'] . '-nav' : '';
1430 $menu_class .= $indicator ? ' aux-with-indicator' : '';
1431 $menu_class .= $splitter ? ' aux-with-splitter' : '';
1432
1433
1434 $mobile_menu_target = '.elementor-element-' . $this->get_id();
1435
1436 switch( $settings['burger_menu_location'] ) {
1437 case 'overlay':
1438 $fullscreen_output = '<section class="aux-fs-popup aux-fs-menu-layout-center aux-indicator">';
1439 $fullscreen_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1440 $fullscreen_output .= '<div class="aux-fs-menu"></div>';
1441 $fullscreen_output .= '</section>';
1442 $mobile_menu_target .= ' .aux-fs-popup .aux-fs-menu';
1443 break;
1444
1445 case 'offcanvas':
1446 $offcanvas_output = '<section class="aux-offcanvas-menu aux-pin-' . $settings['offcanvas_align'] . '">';
1447 $offcanvas_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1448 $offcanvas_output .= '<div class="offcanvas-header"></div>';
1449 $offcanvas_output .= '<div class="offcanvas-content"></div>';
1450 $offcanvas_output .= '<div class="offcanvas-footer"></div>';
1451 $offcanvas_output .= '</section>';
1452 $mobile_menu_target .= ' .aux-offcanvas-menu .offcanvas-content';
1453 break;
1454
1455 case 'toggle-bar':
1456 $toggle_bar_output = '<div class="aux-toggle-menu-bar"></div>';
1457 $mobile_menu_target .= ' .aux-toggle-menu-bar';
1458 break;
1459
1460 default:
1461
1462 }
1463
1464 printf( '<div class="aux-elementor-header-menu aux-nav-menu-element aux-nav-menu-element-%s">', $this->get_id() );
1465
1466 if ( 'default' === $settings['burger_type'] ) {
1467 $burger_content = '<div class="aux-burger ' . $settings['burger_btn_style'] . '"><span class="mid-line"></span></div>';
1468 } else {
1469 $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1470 }
1471
1472 $burger_btn_output = printf( '<div class="aux-burger-box" data-target-panel="%s" data-target-content="%s">%s</div>',
1473 $settings['burger_menu_location'],
1474 '.elementor-element-' . $this->get_id() . ' .aux-master-menu',
1475 $burger_content
1476 );
1477
1478 $breakpoint = 'custom' === $settings['display_burger'] ? $settings['breakpoint']['size'] : $settings['display_burger'];
1479
1480 wp_nav_menu( array(
1481 'container_id' => 'master-menu-elementor-'. $this->get_id(),
1482 'menu' => $settings['menu_slug'],
1483 'direction' => 'burger' === $settings['type'] ? null : $settings['type'],
1484 'mobile_under' => 'burger' === $settings['type'] ? 7000 : $breakpoint,
1485 'mobile_menu_type' => $settings['burger_toggle_type'],
1486 'mobile_menu_target' => $mobile_menu_target,
1487 'theme_location' => 'element',
1488 'extra_class' => esc_attr( $menu_class ),
1489 'fallback_cb' => 'wp_page_menu'
1490 ));
1491
1492 echo $offcanvas_output;
1493 echo $fullscreen_output;
1494 echo $toggle_bar_output;
1495
1496 echo '</div>';
1497
1498 if ( 'burger' !== $settings['type'] ) {
1499 printf( '<style>@media only screen and (min-width: %spx) { .elementor-element-%s .aux-burger-box { display: none } }</style>', $breakpoint + 1, $this->get_id() );
1500 }
1501
1502 }
1503
1504 }
1505