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