PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.6.13
Shortcodes and extra features for Phlox theme v2.6.13
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
1543 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_dictionary' => [
343 'left' => 'text-align:left;',
344 'center' => 'display: block; text-align:center;',
345 'right' => 'display:block; text-align:right;'
346 ],
347 'selectors' => array(
348 '{{WRAPPER}}' => '{{VALUE}};',
349 '{{WRAPPER}} .aux-vertical .aux-menu-depth-0 .aux-item-content' => '{{VALUE}}'
350 )
351 )
352 );
353
354 $this->start_controls_tabs( 'item_colors' );
355
356 $this->start_controls_tab(
357 'item_color_normal',
358 array(
359 'label' => __( 'Normal' , 'auxin-elements' )
360 )
361 );
362
363 $this->add_control(
364 'item_color',
365 array(
366 'label' => __( 'Color', 'auxin-elements' ),
367 'type' => Controls_Manager::COLOR,
368 'selectors' => array(
369 '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'color: {{VALUE}};'
370 )
371 )
372 );
373
374 $this->add_group_control(
375 Group_Control_Typography::get_type(),
376 array(
377 'name' => 'menu_item_typo',
378 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
379 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
380 )
381 );
382
383 $this->add_group_control(
384 Group_Control_Text_Shadow::get_type(),
385 [
386 'name' => 'menu_item_text_shadow',
387 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content'
388 ]
389 );
390
391 $this->add_group_control(
392 Group_Control_Box_Shadow::get_type(),
393 array(
394 'name' => 'item_box_shadow',
395 'selector' => '{{WRAPPER}} .aux-menu-depth-0'
396 )
397 );
398
399 $this->add_group_control(
400 Group_Control_Background::get_type(),
401 array(
402 'name' => 'item_background',
403 'label' => __( 'Background', 'auxin-elements' ),
404 'types' => array( 'classic', 'gradient' ),
405 'selector' => '{{WRAPPER}} .aux-menu-depth-0 '
406 )
407 );
408
409 $this->add_group_control(
410 Group_Control_Border::get_type(),
411 array(
412 'name' => 'item_border',
413 'selector' => '{{WRAPPER}} .aux-menu-depth-0',
414 'separator' => 'none'
415 )
416 );
417
418 $this->add_responsive_control(
419 'item_border_radius',
420 array(
421 'label' => __( 'Border Radius', 'auxin-elements' ),
422 'type' => Controls_Manager::DIMENSIONS,
423 'size_units' => array( 'px', 'em', '%' ),
424 'selectors' => array(
425 '{{WRAPPER}} .aux-menu-depth-0' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
426 ),
427 'allowed_dimensions' => 'all'
428 )
429 );
430
431 $this->end_controls_tab();
432
433 $this->start_controls_tab(
434 'item_color_hover',
435 array(
436 'label' => __( 'Hover' , 'auxin-elements' )
437 )
438 );
439
440 $this->add_control(
441 'item_hover_color',
442 array(
443 'label' => __( 'Color', 'auxin-elements' ),
444 'type' => Controls_Manager::COLOR,
445 'selectors' => array(
446 '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content ' => 'color: {{VALUE}} !important;'
447 )
448 )
449 );
450
451 $this->add_group_control(
452 Group_Control_Typography::get_type(),
453 array(
454 'name' => 'menu_item_typo_hover',
455 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
456 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content',
457 )
458 );
459
460 $this->add_group_control(
461 Group_Control_Text_Shadow::get_type(),
462 [
463 'name' => 'menu_item_text_shadow_hover',
464 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover > .aux-item-content'
465 ]
466 );
467
468 $this->add_group_control(
469 Group_Control_Box_Shadow::get_type(),
470 array(
471 'name' => 'hover_item_box_shadow',
472 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
473 )
474 );
475
476 $this->add_group_control(
477 Group_Control_Background::get_type(),
478 array(
479 'name' => 'hover_item_background',
480 'label' => __( 'Background', 'auxin-elements' ),
481 'types' => array( 'classic', 'gradient' ),
482 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover'
483 )
484 );
485
486 $this->add_group_control(
487 Group_Control_Border::get_type(),
488 array(
489 'name' => 'item_hover_border',
490 'selector' => '{{WRAPPER}} .aux-menu-depth-0.aux-hover',
491 'separator' => 'none'
492 )
493 );
494
495 $this->add_responsive_control(
496 'item_hover_border_radius',
497 array(
498 'label' => __( 'Border Radius', 'auxin-elements' ),
499 'type' => Controls_Manager::DIMENSIONS,
500 'size_units' => array( 'px', 'em', '%' ),
501 'selectors' => array(
502 '{{WRAPPER}} .aux-menu-depth-0.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
503 ),
504 'allowed_dimensions' => 'all',
505 )
506 );
507
508
509 $this->end_controls_tab();
510
511 $this->end_controls_tabs();
512
513
514 $this->add_responsive_control(
515 'item_padding',
516 array(
517 'label' => __( 'Padding', 'auxin-elements' ),
518 'type' => Controls_Manager::DIMENSIONS,
519 'size_units' => array( 'px', '%' ),
520 'selectors' => array(
521 '{{WRAPPER}} .aux-menu-depth-0 > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
522 ),
523 'separator' => 'before'
524 )
525 );
526
527 $this->add_responsive_control(
528 'item_margin',
529 array(
530 'label' => __( 'Margin', 'auxin-elements' ),
531 'type' => Controls_Manager::DIMENSIONS,
532 'size_units' => array( 'px', '%' ),
533 'selectors' => array(
534 '{{WRAPPER}} .aux-menu-depth-0' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
535 ),
536 'seperator' => 'after'
537 )
538 );
539
540 $this->end_controls_section();
541
542 /* Menu item - Current Section
543 /*-------------------------------------*/
544
545 $this->start_controls_section(
546 'menu_item_current_section',
547 array(
548 'label' => __( 'Menu Item - Selected', 'auxin-elements' ),
549 'tab' => Controls_Manager::TAB_STYLE
550 )
551 );
552
553 $this->add_control(
554 'menu_item_current_color',
555 array(
556 'label' => __( 'Color', 'auxin-elements' ),
557 'type' => Controls_Manager::COLOR,
558 'selectors' => array(
559 '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};',
560 ),
561 )
562 );
563
564 $this->add_group_control(
565 Group_Control_Typography::get_type(),
566 array(
567 'name' => 'menu_item_current_typography',
568 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
569 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
570 )
571 );
572
573 $this->add_group_control(
574 Group_Control_Text_Shadow::get_type(),
575 [
576 'name' => 'menu_item_current_text_shadow',
577 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
578 ]
579 );
580
581 $this->add_group_control(
582 Group_Control_Box_Shadow::get_type(),
583 array(
584 'name' => 'menu_item_current_box_shadow',
585 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a'
586 )
587 );
588
589 $this->add_group_control(
590 Group_Control_Background::get_type(),
591 array(
592 'name' => 'menu_item_current_background',
593 'label' => __( 'Background', 'auxin-elements' ),
594 'types' => array( 'classic', 'gradient' ),
595 'selector' => '{{WRAPPER}} .aux-menu-depth-0.current-menu-item > a '
596 )
597 );
598
599 $this->end_controls_section();
600
601
602 /* Submenu Section
603 /*-------------------------------------*/
604
605 $this->start_controls_section(
606 'submenu_style_section',
607 array(
608 'label' => __( 'Submenu', 'auxin-elements' ),
609 'tab' => Controls_Manager::TAB_STYLE
610 )
611 );
612
613 $this->add_control(
614 'submenu_skin',
615 array(
616 'label' => __('Skin','auxin-elements' ),
617 'type' => 'aux-visual-select',
618 'style_items' => 'max-width:45%;',
619 'options' => array(
620 'classic' => array(
621 'label' => __('Paradox', 'auxin-elements' ),
622 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-1.svg'
623 ),
624 'classic-center' => array(
625 'label' => __( 'Classic', 'auxin-elements' ),
626 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-2.svg'
627 ),
628 'dash-divided' => array(
629 'label' => __( 'Dark Transparent', 'auxin-elements' ),
630 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-5.svg'
631 ),
632 'divided' => array(
633 'label' => __( 'Divided', 'auxin-elements' ),
634 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-3.svg'
635 ),
636 'minimal-center' => array(
637 'label' => __( 'Center Paradox', 'auxin-elements' ),
638 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-4.svg'
639 ),
640 'modern' => array(
641 'label' => __( 'Modern Paradox', 'auxin-elements' ),
642 'image' => AUXIN_URL . 'images/visual-select/sub-menu-skin-6.svg'
643 )
644 ),
645 'default' => 'classic',
646 'separator' => 'after'
647 )
648 );
649
650 $this->add_control(
651 'submenu_anim',
652 array(
653 'label' => __('Animation Effect','auxin-elements' ),
654 'type' => 'aux-visual-select',
655 'style_items' => 'max-width:100%;',
656 'options' => array(
657 'none' => array(
658 'label' => __( 'None', 'auxin-elements' ),
659 'video_src' => AUXIN_URL . 'images/visual-select/videos/NoFade.webm webm'
660 ),
661 'fade' => array(
662 'label' => __( 'Fade', 'auxin-elements' ),
663 'video_src' => AUXIN_URL . 'images/visual-select/videos/Fade.webm webm'
664 ),
665 'slide-up' => array(
666 'label' => __( 'Fade and move', 'auxin-elements' ),
667 'video_src' => AUXIN_URL . 'images/visual-select/videos/FadeAndMove.webm webm'
668 )
669 ),
670 'default' => 'none',
671 'seperator' => 'after'
672 )
673 );
674
675 $this->start_controls_tabs( 'sub_background_tab' );
676
677 $this->start_controls_tab(
678 'submenu_style_normal',
679 array(
680 'label' => __( 'Normal' , 'auxin-elements' )
681 )
682 );
683
684 $this->add_group_control(
685 Group_Control_Background::get_type(),
686 array(
687 'name' => 'sub_background',
688 'label' => __( 'Background', 'auxin-elements' ),
689 'types' => array( 'classic', 'gradient' ),
690 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu'
691 )
692 );
693
694 $this->add_group_control(
695 Group_Control_Box_Shadow::get_type(),
696 array(
697 'name' => 'sub_box_shadow',
698 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu'
699 )
700 );
701
702 $this->add_responsive_control(
703 'sub_border_radius',
704 array(
705 'label' => __( 'Border Radius', 'auxin-elements' ),
706 'type' => Controls_Manager::DIMENSIONS,
707 'size_units' => array( 'px', 'em', '%' ),
708 'selectors' => array(
709 '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
710 ),
711 'allowed_dimensions' => 'all',
712 )
713 );
714
715 $this->add_group_control(
716 Group_Control_Border::get_type(),
717 array(
718 'name' => 'sub_border',
719 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu',
720 'separator' => 'none'
721 )
722 );
723
724 $this->end_controls_tab();
725
726 $this->start_controls_tab(
727 'submenu_style_hover',
728 array(
729 'label' => __( 'Hover' , 'auxin-elements' )
730 )
731 );
732
733 $this->add_group_control(
734 Group_Control_Background::get_type(),
735 array(
736 'name' => 'hover_sub_background',
737 'label' => __( 'Background', 'auxin-elements' ),
738 'types' => array( 'classic', 'gradient' ),
739 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover'
740 )
741 );
742
743 $this->add_group_control(
744 Group_Control_Box_Shadow::get_type(),
745 array(
746 'name' => 'hover_sub_box_shadow',
747 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover'
748 )
749 );
750
751 $this->add_responsive_control(
752 'sub_hover_border_radius',
753 array(
754 'label' => __( 'Border Radius', 'auxin-elements' ),
755 'type' => Controls_Manager::DIMENSIONS,
756 'size_units' => array( 'px', 'em', '%' ),
757 'selectors' => array(
758 '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
759 ),
760 'allowed_dimensions' => 'all',
761 )
762 );
763
764 $this->add_group_control(
765 Group_Control_Border::get_type(),
766 array(
767 'name' => 'sub_hover_border',
768 'selector' => '{{WRAPPER}} .aux-menu-item.aux-open > .aux-submenu:hover',
769 'separator' => 'none'
770 )
771 );
772
773 $this->end_controls_tab();
774
775 $this->end_controls_tabs();
776
777 $this->end_controls_section();
778
779
780 /* SubMenu Item Section
781 /*-------------------------------------*/
782
783 $this->start_controls_section(
784 'submenu_item_section',
785 array(
786 'label' => __( 'Submenu Item', 'auxin-elements' ),
787 'tab' => Controls_Manager::TAB_STYLE
788 )
789 );
790
791 $this->start_controls_tabs( 'sub_item_colors' );
792
793 $this->start_controls_tab(
794 'sub_item_color_normal',
795 array(
796 'label' => __( 'Normal' , 'auxin-elements' )
797 )
798 );
799
800 $this->add_control(
801 'sub_item_color',
802 array(
803 'label' => __( 'Color', 'auxin-elements' ),
804 'type' => Controls_Manager::COLOR,
805 'selectors' => array(
806 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'color: {{VALUE}} !important;',
807 ),
808 'seperartor' => 'after'
809 )
810 );
811
812 $this->add_group_control(
813 Group_Control_Typography::get_type(),
814 array(
815 'name' => 'menu_sub_item_typo',
816 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
817 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item',
818 )
819 );
820
821 $this->add_group_control(
822 Group_Control_Text_Shadow::get_type(),
823 [
824 'name' => 'sub_item_text_shadow',
825 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
826 ]
827 );
828
829 $this->add_group_control(
830 Group_Control_Box_Shadow::get_type(),
831 array(
832 'name' => 'sub_item_box_shadow',
833 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
834 )
835 );
836
837 $this->add_group_control(
838 Group_Control_Background::get_type(),
839 array(
840 'name' => 'sub_item_background',
841 'label' => __( 'Background', 'auxin-elements' ),
842 'types' => array( 'classic', 'gradient' ),
843 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content'
844 )
845 );
846
847
848 $this->add_responsive_control(
849 'sub_item_border_radius',
850 array(
851 'label' => __( 'Border Radius', 'auxin-elements' ),
852 'type' => Controls_Manager::DIMENSIONS,
853 'size_units' => array( 'px', 'em', '%' ),
854 'selectors' => array(
855 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
856 ),
857 'allowed_dimensions' => 'all',
858 )
859 );
860
861 $this->add_group_control(
862 Group_Control_Border::get_type(),
863 array(
864 'name' => 'sub_item_border',
865 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content',
866 'separator' => 'none'
867 )
868 );
869
870 $this->end_controls_tab();
871
872 $this->start_controls_tab(
873 'sub_item_color_hover',
874 array(
875 'label' => __( 'Hover' , 'auxin-elements' )
876 )
877 );
878
879 $this->add_control(
880 'sub_item_hover_color',
881 array(
882 'label' => __( 'Color', 'auxin-elements' ),
883 'type' => Controls_Manager::COLOR,
884 'selectors' => array(
885 '{{WRAPPER}} .aux-submenu .aux-menu-item.aux-hover .aux-item-content' => 'color: {{VALUE}} !important;'
886 ),
887 'seperartor' => 'after'
888 )
889 );
890
891 $this->add_group_control(
892 Group_Control_Typography::get_type(),
893 array(
894 'name' => 'menu_sub_item_typo_hover',
895 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
896 'selector' => '{{WRAPPER}} .aux-submenu .aux-menu-item.aux-hover',
897 )
898 );
899
900 $this->add_group_control(
901 Group_Control_Text_Shadow::get_type(),
902 [
903 'name' => 'hover_sub_item_text_shadow',
904 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
905 ]
906 );
907
908 $this->add_group_control(
909 Group_Control_Box_Shadow::get_type(),
910 array(
911 'name' => 'hover_sub_item_box_shadow',
912 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
913 )
914 );
915
916 $this->add_group_control(
917 Group_Control_Background::get_type(),
918 array(
919 'name' => 'hover_sub_item_background',
920 'label' => __( 'Background', 'auxin-elements' ),
921 'types' => array( 'classic', 'gradient' ),
922 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content'
923 )
924 );
925
926 $this->add_responsive_control(
927 'sub_item_hover_border_radius',
928 array(
929 'label' => __( 'Border Radius', 'auxin-elements' ),
930 'type' => Controls_Manager::DIMENSIONS,
931 'size_units' => array( 'px', 'em', '%' ),
932 'selectors' => array(
933 '{{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}};'
934 ),
935 'allowed_dimensions' => 'all',
936 )
937 );
938
939 $this->add_group_control(
940 Group_Control_Border::get_type(),
941 array(
942 'name' => 'sub_item_hover_border',
943 'selector' => '{{WRAPPER}} .aux-menu-depth-0 > .aux-submenu > .aux-menu-item.aux-hover > .aux-item-content',
944 'separator' => 'none'
945 )
946 );
947
948 $this->end_controls_tab();
949
950 $this->end_controls_tabs();
951
952
953 $this->add_responsive_control(
954 'sub_item_padding',
955 array(
956 'label' => __( 'Padding', 'auxin-elements' ),
957 'type' => Controls_Manager::DIMENSIONS,
958 'size_units' => array( 'px', '%' ),
959 'selectors' => array(
960 '{{WRAPPER}} .aux-submenu .aux-menu-item .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
961 ),
962 'separator' => 'before'
963 )
964 );
965
966 $this->add_responsive_control(
967 'sub_item_margin',
968 array(
969 'label' => __( 'Margin', 'auxin-elements' ),
970 'type' => Controls_Manager::DIMENSIONS,
971 'size_units' => array( 'px', '%' ),
972 'selectors' => array(
973 '{{WRAPPER}} .aux-submenu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
974 ),
975 'seperator' => 'after'
976 )
977 );
978
979 $this->end_controls_section();
980
981 /* Burger Button Section
982 /*-------------------------------------*/
983
984 $this->start_controls_section(
985 'burger_section',
986 array(
987 'label' => __( 'Burger Button', 'auxin-elements' ),
988 'tab' => Controls_Manager::TAB_STYLE
989 )
990 );
991
992 $this->add_control(
993 'burger_type',
994 array(
995 'label' => __( 'Type', 'auxin-elements' ),
996 'type' => Controls_Manager::SELECT,
997 'default' => 'default',
998 'options' => array(
999 'default' => __( 'Default', 'auxin-elements' ),
1000 'custom' => __( 'Custom', 'auxin-elements' ),
1001 ),
1002 )
1003 );
1004
1005 $this->start_controls_tabs(
1006 'burger_color',
1007 array(
1008 'condition' => array(
1009 'burger_type' => 'default'
1010 )
1011 )
1012 );
1013
1014 $this->start_controls_tab(
1015 'burger_color_normal',
1016 array(
1017 'label' => __( 'Normal' , 'auxin-elements' )
1018 )
1019 );
1020
1021 $this->add_control(
1022 'burger_btn_color',
1023 array(
1024 'label' => __( 'Color', 'auxin-elements' ),
1025 'type' => Controls_Manager::COLOR,
1026 'selectors' => array(
1027 '{{WRAPPER}} .aux-burger:before, {{WRAPPER}} .aux-burger:after, {{WRAPPER}} .aux-burger .mid-line' => 'border-color: {{VALUE}} !important;',
1028 ),
1029 'seperartor' => 'after'
1030 )
1031 );
1032
1033 $this->end_controls_tab();
1034
1035 $this->start_controls_tab(
1036 'burger_color_hover',
1037 array(
1038 'label' => __( 'Hover' , 'auxin-elements' )
1039 )
1040 );
1041
1042 $this->add_control(
1043 'burger_btn_hover_color',
1044 array(
1045 'label' => __( 'Color', 'auxin-elements' ),
1046 'type' => Controls_Manager::COLOR,
1047 'selectors' => array(
1048 '{{WRAPPER}} .aux-burger:hover:before, {{WRAPPER}} .aux-burger:hover:after, {{WRAPPER}} .aux-burger:hover .mid-line' => 'border-color: {{VALUE}} !important;',
1049 ),
1050 'seperartor' => 'after'
1051 )
1052 );
1053
1054 $this->end_controls_tab();
1055
1056 $this->end_controls_tabs();
1057
1058 $this->add_control(
1059 'burger_btn_style',
1060 array(
1061 'label' => __('Burger Button Style','auxin-elements' ),
1062 'type' => 'aux-visual-select',
1063 'style_items' => 'max-width:45%;',
1064 'options' => array(
1065 'aux-lite-large' => array(
1066 'label' => __( 'Expandable under top header', 'auxin-elements' ),
1067 'image' => AUXIN_URL . 'images/visual-select/burger-lite-large.svg'
1068 ),
1069 'aux-regular-large' => array(
1070 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1071 'image' => AUXIN_URL . 'images/visual-select/burger-regular-large.svg'
1072 ),
1073 'aux-thick-large' => array(
1074 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1075 'image' => AUXIN_URL . 'images/visual-select/burger-thick-large.svg'
1076 ),
1077 'aux-lite-medium' => array(
1078 'label' => __( 'FullScreen on entire page', 'auxin-elements' ),
1079 'image' => AUXIN_URL . 'images/visual-select/burger-lite-medium.svg'
1080 ),
1081 'aux-regular-medium' => array(
1082 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1083 'image' => AUXIN_URL . 'images/visual-select/burger-regular-medium.svg'
1084 ),
1085 'aux-thick-medium' => array(
1086 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1087 'image' => AUXIN_URL . 'images/visual-select/burger-thick-medium.svg'
1088 ),
1089 'aux-lite-small' => array(
1090 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1091 'image' => AUXIN_URL . 'images/visual-select/burger-lite-small.svg'
1092 ),
1093 'aux-regular-small' => array(
1094 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1095 'image' => AUXIN_URL . 'images/visual-select/burger-regular-small.svg'
1096 ),
1097 'aux-thick-small' => array(
1098 'label' => __( 'Offcanvas panel', 'auxin-elements' ),
1099 'image' => AUXIN_URL . 'images/visual-select/burger-thick-small.svg'
1100 )
1101 ),
1102 'default' => 'aux-lite-small',
1103 'seperator' => 'before',
1104 'condition' => array(
1105 'burger_type' => 'default'
1106 )
1107 )
1108 );
1109
1110 $this->add_control(
1111 'burger_custom',
1112 array(
1113 'label' => '',
1114 'type' => Controls_Manager::CODE,
1115 'default' => '',
1116 'placeholder' => __( 'Enter inline SVG content here', 'auxin-elements' ),
1117 'show_label' => false,
1118 'condition' => array(
1119 'burger_type' => 'custom'
1120 )
1121 )
1122 );
1123
1124 $this->add_control(
1125 'burger_offcanvas_menu_bg_color',
1126 array(
1127 'label' => __( 'Off canvas menu background color', 'auxin-elements' ),
1128 'type' => Controls_Manager::COLOR,
1129 'selectors' => array(
1130 '{{WRAPPER}} .aux-offcanvas-menu' => 'background-color: {{VALUE}};',
1131 ),
1132 )
1133 );
1134
1135 $this->end_controls_section();
1136
1137 /* Full Screen Menu Section
1138 /*-------------------------------------*/
1139
1140 $this->start_controls_section(
1141 'fullscr_section',
1142 array(
1143 'label' => __( 'Fullscreen Menu', 'auxin-elements' ),
1144 'tab' => Controls_Manager::TAB_STYLE,
1145 'condition' => array(
1146 'burger_menu_location' => 'overlay'
1147 )
1148 )
1149 );
1150
1151 $this->add_group_control(
1152 Group_Control_Background::get_type(),
1153 array(
1154 'name' => 'fullscr_bg',
1155 'label' => __( 'Background', 'auxin-elements' ),
1156 'types' => array( 'classic', 'gradient' ),
1157 'selector' => '{{WRAPPER}} .aux-fs-popup'
1158 )
1159 );
1160
1161 $this->start_controls_tabs( 'fullscr_item_colors' );
1162
1163 $this->start_controls_tab(
1164 'fullscr_item_color_normal',
1165 array(
1166 'label' => __( 'Normal' , 'auxin-elements' )
1167 )
1168 );
1169
1170 $this->add_control(
1171 'fullscr_item_color',
1172 array(
1173 'label' => __( 'Color', 'auxin-elements' ),
1174 'type' => Controls_Manager::COLOR,
1175 'selectors' => array(
1176 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}};',
1177 ),
1178 'seperartor' => 'after'
1179 )
1180 );
1181
1182 $this->add_group_control(
1183 Group_Control_Typography::get_type(),
1184 array(
1185 'name' => 'fullscr_menu_item_typo',
1186 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1187 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content',
1188 )
1189 );
1190
1191 $this->add_group_control(
1192 Group_Control_Text_Shadow::get_type(),
1193 [
1194 'name' => 'fullscr_item_text_shadow',
1195 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content'
1196 ]
1197 );
1198
1199 $this->add_group_control(
1200 Group_Control_Box_Shadow::get_type(),
1201 array(
1202 'name' => 'fullscr_item_box_shadow',
1203 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item'
1204 )
1205 );
1206
1207 $this->add_group_control(
1208 Group_Control_Background::get_type(),
1209 array(
1210 'name' => 'fullscr_item_background',
1211 'label' => __( 'Background', 'auxin-elements' ),
1212 'types' => array( 'classic', 'gradient' ),
1213 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1214 )
1215 );
1216
1217 $this->add_responsive_control(
1218 'fullscr_item_border_radius',
1219 array(
1220 'label' => __( 'Border Radius', 'auxin-elements' ),
1221 'type' => Controls_Manager::DIMENSIONS,
1222 'size_units' => array( 'px', 'em', '%' ),
1223 'selectors' => array(
1224 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1225 ),
1226 'allowed_dimensions' => 'all',
1227 )
1228 );
1229
1230 $this->add_group_control(
1231 Group_Control_Border::get_type(),
1232 array(
1233 'name' => 'fullscr_item_border',
1234 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item',
1235 'separator' => 'none'
1236 )
1237 );
1238
1239 $this->end_controls_tab();
1240
1241 $this->start_controls_tab(
1242 'fullscr_item_color_hover',
1243 array(
1244 'label' => __( 'Hover' , 'auxin-elements' )
1245 )
1246 );
1247
1248 $this->add_control(
1249 'fullscr_item_hover_color',
1250 array(
1251 'label' => __( 'Color', 'auxin-elements' ),
1252 'type' => Controls_Manager::COLOR,
1253 'selectors' => array(
1254 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}} !important;'
1255 ),
1256 'seperartor' => 'after'
1257 )
1258 );
1259
1260 $this->add_group_control(
1261 Group_Control_Typography::get_type(),
1262 array(
1263 'name' => 'fullscr_menu_item_typo_hover',
1264 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1265 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1266 )
1267 );
1268
1269 $this->add_group_control(
1270 Group_Control_Text_Shadow::get_type(),
1271 [
1272 'name' => 'fullscr_hover_item_text_shadow',
1273 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content'
1274 ]
1275 );
1276
1277 $this->add_group_control(
1278 Group_Control_Box_Shadow::get_type(),
1279 array(
1280 'name' => 'fullscr_hover_item_box_shadow',
1281 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1282 )
1283 );
1284
1285 $this->add_group_control(
1286 Group_Control_Background::get_type(),
1287 array(
1288 'name' => 'fullscr_hover_item_background',
1289 'label' => __( 'Background', 'auxin-elements' ),
1290 'types' => array( 'classic', 'gradient' ),
1291 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1292 )
1293 );
1294
1295 $this->add_responsive_control(
1296 'fullscr_item_hover_border_radius',
1297 array(
1298 'label' => __( 'Border Radius', 'auxin-elements' ),
1299 'type' => Controls_Manager::DIMENSIONS,
1300 'size_units' => array( 'px', 'em', '%' ),
1301 'selectors' => array(
1302 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1303 ),
1304 'allowed_dimensions' => 'all',
1305 'separator' => 'after'
1306 )
1307 );
1308
1309 $this->add_group_control(
1310 Group_Control_Border::get_type(),
1311 array(
1312 'name' => 'fullscr_item_hover_border',
1313 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover',
1314 'separator' => 'none'
1315 )
1316 );
1317
1318 $this->end_controls_tab();
1319
1320 $this->end_controls_tabs();
1321
1322 $this->add_responsive_control(
1323 'fullscr_item_padding',
1324 array(
1325 'label' => __( 'Padding', 'auxin-elements' ),
1326 'type' => Controls_Manager::DIMENSIONS,
1327 'size_units' => array( 'px', '%' ),
1328 'selectors' => array(
1329 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1330 ),
1331 'separator' => 'before'
1332 )
1333 );
1334
1335 $this->add_responsive_control(
1336 'fullscr_item_margin',
1337 array(
1338 'label' => __( 'Margin', 'auxin-elements' ),
1339 'type' => Controls_Manager::DIMENSIONS,
1340 'size_units' => array( 'px', '%' ),
1341 'selectors' => array(
1342 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1343 ),
1344 'seperator' => 'after'
1345 )
1346 );
1347
1348 $this->add_responsive_control(
1349 'fullscr_align',
1350 array(
1351 'label' => __('Text Align','auxin-elements'),
1352 'type' => Controls_Manager::CHOOSE,
1353 'devices' => array( 'desktop', 'mobile' ),
1354 'options' => array(
1355 'left' => array(
1356 'title' => __( 'Left', 'auxin-elements' ),
1357 'icon' => 'fa fa-align-left',
1358 ),
1359 'center' => array(
1360 'title' => __( 'Center', 'auxin-elements' ),
1361 'icon' => 'fa fa-align-center',
1362 ),
1363 'right' => array(
1364 'title' => __( 'Right', 'auxin-elements' ),
1365 'icon' => 'fa fa-align-right',
1366 ),
1367 ),
1368 'default' => 'left',
1369 'toggle' => true,
1370 'selectors' => array(
1371 '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
1372 ),
1373 'separator' => 'after'
1374 )
1375 );
1376
1377 $this->add_control(
1378 'fullscr_current_item_color',
1379 array(
1380 'label' => __( 'Color', 'auxin-elements' ),
1381 'type' => Controls_Manager::COLOR,
1382 'selectors' => array(
1383 '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};'
1384 )
1385 )
1386 );
1387
1388 $this->add_group_control(
1389 Group_Control_Typography::get_type(),
1390 array(
1391 'name' => 'fullscr_current_item_typography',
1392 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1393 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1394 )
1395 );
1396
1397 $this->add_group_control(
1398 Group_Control_Text_Shadow::get_type(),
1399 [
1400 'name' => 'fullscr_current_item_text_shadow',
1401 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a',
1402 'separator' => 'after'
1403 ]
1404 );
1405
1406 $this->add_control(
1407 'fullscr_close_btn_heading',
1408 [
1409 'label' => __( 'Close Button', 'auxin-elements' ),
1410 'type' => Controls_Manager::HEADING
1411 ]
1412 );
1413
1414 $this->add_control(
1415 'fullscr_close_btn_border_color',
1416 [
1417 'label' => __( 'Outline Color', 'auxin-elements' ),
1418 'type' => Controls_Manager::COLOR,
1419 'selectors' => [
1420 '{{WRAPPER}} .aux-fs-popup .aux-panel-close' => 'border-color: {{VALUE}};'
1421 ]
1422 ]
1423 );
1424
1425 $this->add_control(
1426 'fullscr_close_btn_symbol_color',
1427 [
1428 'label' => __( 'Outline Color', 'auxin-elements' ),
1429 'type' => Controls_Manager::COLOR,
1430 'selectors' => [
1431 '{{WRAPPER}} .aux-fs-popup .aux-panel-close .aux-close:before' => 'background-color: {{VALUE}};',
1432 '{{WRAPPER}} .aux-fs-popup .aux-panel-close .aux-close:after' => 'background-color: {{VALUE}};'
1433 ]
1434 ]
1435 );
1436
1437 $this->end_controls_section();
1438
1439 }
1440
1441 /**
1442 * Render MenuBox widget output on the frontend.
1443 *
1444 * Written in PHP and used to generate the final HTML.
1445 *
1446 * @since 1.0.0
1447 * @access protected
1448 */
1449 protected function render() {
1450 $settings = $this->get_settings_for_display();
1451
1452 if ( ! isset( $settings['menu_slug'] ) ) {
1453 return _e( 'There are no menus in your site.', 'auxin-elements' ) ;
1454 }
1455
1456
1457 $offcanvas_output = '';
1458 $fullscreen_output = '';
1459 $toggle_bar_output = '';
1460
1461 $indicator = auxin_is_true( $settings['indicator'] );
1462 $splitter = auxin_is_true( $settings['splitter'] );
1463
1464
1465 $menu_class = '';
1466 $menu_class .= ' aux-skin-' . $settings['submenu_skin'] ;
1467 $menu_class .= 'none' !== $settings['submenu_anim'] ? ' aux-' . $settings['submenu_anim'] . '-nav' : '';
1468 $menu_class .= $indicator ? ' aux-with-indicator' : '';
1469 $menu_class .= $splitter ? ' aux-with-splitter' : '';
1470
1471
1472 $mobile_menu_target = '.elementor-element-' . $this->get_id();
1473
1474 switch( $settings['burger_menu_location'] ) {
1475 case 'overlay':
1476 $fullscreen_output = '<section class="aux-fs-popup aux-fs-menu-layout-center aux-indicator">';
1477 $fullscreen_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1478 $fullscreen_output .= '<div class="aux-fs-menu"></div>';
1479 $fullscreen_output .= '</section>';
1480 $mobile_menu_target .= ' .aux-fs-popup .aux-fs-menu';
1481 break;
1482
1483 case 'offcanvas':
1484 $offcanvas_output = '<section class="aux-offcanvas-menu aux-pin-' . $settings['offcanvas_align'] . '">';
1485 $offcanvas_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1486 $offcanvas_output .= '<div class="offcanvas-header"></div>';
1487 $offcanvas_output .= '<div class="offcanvas-content"></div>';
1488 $offcanvas_output .= '<div class="offcanvas-footer"></div>';
1489 $offcanvas_output .= '</section>';
1490 $mobile_menu_target .= ' .aux-offcanvas-menu .offcanvas-content';
1491 break;
1492
1493 case 'toggle-bar':
1494 $toggle_bar_output = '<div class="aux-toggle-menu-bar"></div>';
1495 $mobile_menu_target .= ' .aux-toggle-menu-bar';
1496 break;
1497
1498 default:
1499
1500 }
1501
1502 printf( '<div class="aux-elementor-header-menu aux-nav-menu-element aux-nav-menu-element-%s">', $this->get_id() );
1503
1504 if ( 'default' === $settings['burger_type'] ) {
1505 $burger_content = '<div class="aux-burger ' . $settings['burger_btn_style'] . '"><span class="mid-line"></span></div>';
1506 } else {
1507 $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1508 }
1509
1510 $burger_btn_output = printf( '<div class="aux-burger-box" data-target-panel="%s" data-target-content="%s">%s</div>',
1511 $settings['burger_menu_location'],
1512 '.elementor-element-' . $this->get_id() . ' .aux-master-menu',
1513 $burger_content
1514 );
1515
1516 $breakpoint = 'custom' === $settings['display_burger'] ? $settings['breakpoint']['size'] : $settings['display_burger'];
1517
1518 wp_nav_menu( array(
1519 'container_id' => 'master-menu-elementor-'. $this->get_id(),
1520 'menu' => $settings['menu_slug'],
1521 'direction' => 'burger' === $settings['type'] ? null : $settings['type'],
1522 'mobile_under' => 'burger' === $settings['type'] ? 7000 : $breakpoint,
1523 'mobile_menu_type' => $settings['burger_toggle_type'],
1524 'mobile_menu_target' => $mobile_menu_target,
1525 'theme_location' => 'element',
1526 'extra_class' => esc_attr( $menu_class ),
1527 'fallback_cb' => 'wp_page_menu'
1528 ));
1529
1530 echo $offcanvas_output;
1531 echo $fullscreen_output;
1532 echo $toggle_bar_output;
1533
1534 echo '</div>';
1535
1536 if ( 'burger' !== $settings['type'] ) {
1537 printf( '<style>@media only screen and (min-width: %spx) { .elementor-element-%s .aux-burger-box { display: none } }</style>', $breakpoint + 1, $this->get_id() );
1538 }
1539
1540 }
1541
1542 }
1543