PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.15.2
Shortcodes and extra features for Phlox theme v2.15.2
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 4 years ago copyright.php 4 years ago current-time.php 4 years ago logo.php 3 years ago menu.php 3 years ago modern-search.php 2 years ago search.php 4 years ago select.php 3 years ago shopping-cart.php 4 years ago site-title.php 3 years ago
menu.php
1619 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\Schemes\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 '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' => 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' => 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' => 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' => 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->start_controls_tabs( 'fullscr_item_colors' );
1152
1153 $this->start_controls_tab(
1154 'fullscr_item_color_normal',
1155 array(
1156 'label' => __( 'Normal' , 'auxin-elements' )
1157 )
1158 );
1159
1160 $this->add_control(
1161 'fullscr_item_color',
1162 array(
1163 'label' => __( 'Color', 'auxin-elements' ),
1164 'type' => Controls_Manager::COLOR,
1165 'selectors' => array(
1166 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'color: {{VALUE}};',
1167 ),
1168 'seperartor' => 'after'
1169 )
1170 );
1171
1172 $this->add_group_control(
1173 Group_Control_Typography::get_type(),
1174 array(
1175 'name' => 'fullscr_menu_item_typo',
1176 'scheme' => Typography::TYPOGRAPHY_1,
1177 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content',
1178 )
1179 );
1180
1181 $this->add_group_control(
1182 Group_Control_Text_Shadow::get_type(),
1183 [
1184 'name' => 'fullscr_item_text_shadow',
1185 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content'
1186 ]
1187 );
1188
1189 $this->add_group_control(
1190 Group_Control_Box_Shadow::get_type(),
1191 array(
1192 'name' => 'fullscr_item_box_shadow',
1193 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item'
1194 )
1195 );
1196
1197 $this->add_group_control(
1198 Group_Control_Background::get_type(),
1199 array(
1200 'name' => 'fullscr_item_background',
1201 'label' => __( 'Background', 'auxin-elements' ),
1202 'types' => array( 'classic', 'gradient' ),
1203 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item '
1204 )
1205 );
1206
1207 $this->add_responsive_control(
1208 'fullscr_item_border_radius',
1209 array(
1210 'label' => __( 'Border Radius', 'auxin-elements' ),
1211 'type' => Controls_Manager::DIMENSIONS,
1212 'size_units' => array( 'px', 'em', '%' ),
1213 'selectors' => array(
1214 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1215 ),
1216 'allowed_dimensions' => 'all',
1217 )
1218 );
1219
1220 $this->add_group_control(
1221 Group_Control_Border::get_type(),
1222 array(
1223 'name' => 'fullscr_item_border',
1224 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item',
1225 'separator' => 'none'
1226 )
1227 );
1228
1229 $this->end_controls_tab();
1230
1231 $this->start_controls_tab(
1232 'fullscr_item_color_hover',
1233 array(
1234 'label' => __( 'Hover' , 'auxin-elements' )
1235 )
1236 );
1237
1238 $this->add_control(
1239 'fullscr_item_hover_color',
1240 array(
1241 'label' => __( 'Color', 'auxin-elements' ),
1242 'type' => Controls_Manager::COLOR,
1243 'selectors' => array(
1244 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content' => 'color: {{VALUE}} !important;'
1245 ),
1246 'seperartor' => 'after'
1247 )
1248 );
1249
1250 $this->add_group_control(
1251 Group_Control_Typography::get_type(),
1252 array(
1253 'name' => 'fullscr_menu_item_typo_hover',
1254 'scheme' => Typography::TYPOGRAPHY_1,
1255 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content',
1256 )
1257 );
1258
1259 $this->add_group_control(
1260 Group_Control_Text_Shadow::get_type(),
1261 [
1262 'name' => 'fullscr_hover_item_text_shadow',
1263 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover > .aux-item-content'
1264 ]
1265 );
1266
1267 $this->add_group_control(
1268 Group_Control_Box_Shadow::get_type(),
1269 array(
1270 'name' => 'fullscr_hover_item_box_shadow',
1271 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1272 )
1273 );
1274
1275 $this->add_group_control(
1276 Group_Control_Background::get_type(),
1277 array(
1278 'name' => 'fullscr_hover_item_background',
1279 'label' => __( 'Background', 'auxin-elements' ),
1280 'types' => array( 'classic', 'gradient' ),
1281 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover'
1282 )
1283 );
1284
1285 $this->add_responsive_control(
1286 'fullscr_item_hover_border_radius',
1287 array(
1288 'label' => __( 'Border Radius', 'auxin-elements' ),
1289 'type' => Controls_Manager::DIMENSIONS,
1290 'size_units' => array( 'px', 'em', '%' ),
1291 'selectors' => array(
1292 '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover' => 'border-radius:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1293 ),
1294 'allowed_dimensions' => 'all',
1295 'separator' => 'after'
1296 )
1297 );
1298
1299 $this->add_group_control(
1300 Group_Control_Border::get_type(),
1301 array(
1302 'name' => 'fullscr_item_hover_border',
1303 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-item.aux-hover',
1304 'separator' => 'none'
1305 )
1306 );
1307
1308 $this->end_controls_tab();
1309
1310 $this->end_controls_tabs();
1311
1312 $this->add_responsive_control(
1313 'fullscr_item_padding',
1314 array(
1315 'label' => __( 'Padding', 'auxin-elements' ),
1316 'type' => Controls_Manager::DIMENSIONS,
1317 'size_units' => array( 'px', '%' ),
1318 'selectors' => array(
1319 '{{WRAPPER}} .aux-fs-menu .aux-menu-item > .aux-item-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1320 ),
1321 'separator' => 'before'
1322 )
1323 );
1324
1325 $this->add_responsive_control(
1326 'fullscr_item_margin',
1327 array(
1328 'label' => __( 'Margin', 'auxin-elements' ),
1329 'type' => Controls_Manager::DIMENSIONS,
1330 'size_units' => array( 'px', '%' ),
1331 'selectors' => array(
1332 '{{WRAPPER}} .aux-fs-menu .aux-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1333 ),
1334 'seperator' => 'after'
1335 )
1336 );
1337
1338 $this->add_responsive_control(
1339 'fullscr_align',
1340 array(
1341 'label' => __('Text Align','auxin-elements'),
1342 'type' => Controls_Manager::CHOOSE,
1343 'devices' => array( 'desktop', 'mobile' ),
1344 'options' => array(
1345 'left' => array(
1346 'title' => __( 'Left', 'auxin-elements' ),
1347 'icon' => 'eicon-text-align-left',
1348 ),
1349 'center' => array(
1350 'title' => __( 'Center', 'auxin-elements' ),
1351 'icon' => 'eicon-text-align-center',
1352 ),
1353 'right' => array(
1354 'title' => __( 'Right', 'auxin-elements' ),
1355 'icon' => 'eicon-text-align-right',
1356 ),
1357 ),
1358 'default' => 'left',
1359 'toggle' => true,
1360 'selectors' => array(
1361 '{{WRAPPER}} .aux-fs-menu .aux-master-menu' => 'text-align: {{VALUE}}',
1362 ),
1363 'separator' => 'after'
1364 )
1365 );
1366
1367 $this->add_control(
1368 'fullscr_current_item_color',
1369 array(
1370 'label' => __( 'Main Menu Color', 'auxin-elements' ),
1371 'type' => Controls_Manager::COLOR,
1372 'selectors' => array(
1373 '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a' => 'color: {{VALUE}};'
1374 )
1375 )
1376 );
1377
1378 $this->add_group_control(
1379 Group_Control_Typography::get_type(),
1380 array(
1381 'name' => 'fullscr_current_item_typography',
1382 'scheme' => Typography::TYPOGRAPHY_1,
1383 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a'
1384 )
1385 );
1386
1387 $this->add_group_control(
1388 Group_Control_Text_Shadow::get_type(),
1389 [
1390 'name' => 'fullscr_current_item_text_shadow',
1391 'selector' => '{{WRAPPER}} .aux-fs-menu .aux-menu-depth-0.current-menu-item > a',
1392 'separator' => 'after'
1393 ]
1394 );
1395
1396 $this->end_controls_section();
1397
1398
1399 /* Full Screen Window
1400 /*-------------------------------------*/
1401
1402 $this->start_controls_section(
1403 'fullscr_window',
1404 array(
1405 'label' => __( 'Fullscreen Window', 'auxin-elements' ),
1406 'tab' => Controls_Manager::TAB_STYLE,
1407 'condition' => array(
1408 'burger_menu_location' => 'overlay'
1409 )
1410 )
1411 );
1412
1413 $this->add_group_control(
1414 Group_Control_Background::get_type(),
1415 array(
1416 'name' => 'fullscr_bg',
1417 'label' => __( 'Background', 'auxin-elements' ),
1418 'types' => array( 'classic', 'gradient' ),
1419 'selector' => '{{WRAPPER}} .aux-fs-popup'
1420 )
1421 );
1422
1423 $this->add_control(
1424 'fullscr_close_btn_heading',
1425 [
1426 'label' => __( 'Close Button', 'auxin-elements' ),
1427 'type' => Controls_Manager::HEADING,
1428 'separator'=> 'before'
1429 ]
1430 );
1431
1432 $this->add_control(
1433 'fullscr_close_btn_border_color',
1434 [
1435 'label' => __( 'Close button outline color', 'auxin-elements' ),
1436 'type' => Controls_Manager::COLOR,
1437 'selectors' => [
1438 '{{WRAPPER}} .aux-fs-popup .aux-panel-close' => 'border-color: {{VALUE}};'
1439 ]
1440 ]
1441 );
1442
1443 $this->add_control(
1444 'fullscr_close_btn_symbol_color',
1445 [
1446 'label' => __( 'Close button symbol color', 'auxin-elements' ),
1447 'type' => Controls_Manager::COLOR,
1448 'selectors' => [
1449 '{{WRAPPER}} .aux-fs-popup .aux-panel-close .aux-close:before' => 'background-color: {{VALUE}};',
1450 '{{WRAPPER}} .aux-fs-popup .aux-panel-close .aux-close:after' => 'background-color: {{VALUE}};'
1451 ],
1452 'separator'=> 'after'
1453 ]
1454 );
1455
1456 $this->add_control(
1457 'fullscr_window_has_title',
1458 array(
1459 'label' => __( 'Display Menu Title', 'auxin-elements' ),
1460 'type' => Controls_Manager::SWITCHER,
1461 'label_on' => __( 'Show', 'auxin-elements' ),
1462 'label_off' => __( 'Hide', 'auxin-elements' ),
1463 )
1464 );
1465
1466 $this->add_control(
1467 'fullscr_window_title_text',
1468 array(
1469 'label' => __('Menu Title Text','auxin-elements' ),
1470 'type' => Controls_Manager::TEXT,
1471 'default' => '',
1472 'condition' => array(
1473 'fullscr_window_has_title' => 'yes'
1474 )
1475 )
1476 );
1477
1478 $this->add_group_control(
1479 Group_Control_Typography::get_type(),
1480 array(
1481 'name' => 'fullscr_window_title_typo',
1482 'label' => __( 'Menu Title Typography', 'auxin-elements' ),
1483 'scheme' => Typography::TYPOGRAPHY_1,
1484 'selector' => '{{WRAPPER}} .aux-has-menu-title .aux-fs-menu:before',
1485 'condition' => array(
1486 'fullscr_window_has_title' => 'yes'
1487 )
1488 )
1489 );
1490
1491 $this->add_control(
1492 'fullscr_window_title_color',
1493 [
1494 'label' => __( 'Menu Title Color', 'auxin-elements' ),
1495 'type' => Controls_Manager::COLOR,
1496 'selectors' => [
1497 '{{WRAPPER}} .aux-has-menu-title .aux-fs-menu:before' => 'color: {{VALUE}};'
1498 ],
1499 'condition' => array(
1500 'fullscr_window_has_title' => 'yes'
1501 )
1502 ]
1503 );
1504
1505 $this->end_controls_section();
1506
1507 }
1508
1509 /**
1510 * Render MenuBox widget output on the frontend.
1511 *
1512 * Written in PHP and used to generate the final HTML.
1513 *
1514 * @since 1.0.0
1515 * @access protected
1516 */
1517 protected function render() {
1518 $settings = $this->get_settings_for_display();
1519
1520 if ( ! isset( $settings['menu_slug'] ) ) {
1521 return esc_html_e( 'Please choose a menu.', 'auxin-elements' ) ;
1522 }
1523
1524 if ( empty( wp_get_nav_menu_object( $settings['menu_slug'] ) ) || ! wp_get_nav_menu_object( $settings['menu_slug'] )->count ) {
1525 return esc_html_e( 'There are no menu items in this menu.', 'auxin-elements' ) ;
1526 }
1527
1528 $offcanvas_output = '';
1529 $fullscreen_output = '';
1530 $toggle_bar_output = '';
1531
1532 $indicator = auxin_is_true( $settings['indicator'] );
1533 $splitter = auxin_is_true( $settings['splitter'] );
1534
1535
1536 $menu_class = '';
1537 $menu_class .= ' aux-skin-' . $settings['submenu_skin'] ;
1538 $menu_class .= 'none' !== $settings['submenu_anim'] ? ' aux-' . $settings['submenu_anim'] . '-nav' : '';
1539 $menu_class .= $indicator ? ' aux-with-indicator' : '';
1540 $menu_class .= $splitter ? ' aux-with-splitter' : '';
1541
1542
1543 $mobile_menu_target = '.elementor-element-' . $this->get_id();
1544
1545 switch( $settings['burger_menu_location'] ) {
1546 case 'overlay':
1547 $fullscreen_menu_title = auxin_is_true( $settings['fullscr_window_has_title'] ) &&
1548 ! empty( $settings['fullscr_window_title_text'] ) ? $settings['fullscr_window_title_text'] : '';
1549 $fullscreen_popup_classes = 'aux-fs-popup aux-fs-menu-layout-center aux-indicator';
1550 $fullscreen_popup_classes .= ! empty( $fullscreen_menu_title ) ? ' aux-has-menu-title' : '';
1551
1552 $fullscreen_output = '<section class="'.esc_attr( $fullscreen_popup_classes ).'">';
1553 $fullscreen_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1554 $fullscreen_output .= '<div class="aux-fs-menu" data-menu-title="'.esc_attr( $fullscreen_menu_title ).'"></div>';
1555 $fullscreen_output .= '</section>';
1556 $mobile_menu_target .= ' .aux-fs-popup .aux-fs-menu';
1557 break;
1558
1559 case 'offcanvas':
1560 $offcanvas_output = '<section class="aux-offcanvas-menu aux-pin-' . esc_attr( $settings['offcanvas_align'] ) . '">';
1561 $offcanvas_output .= '<div class="aux-panel-close"><div class="aux-close aux-cross-symbol aux-thick-medium"></div></div>';
1562 $offcanvas_output .= '<div class="offcanvas-header"></div>';
1563 $offcanvas_output .= '<div class="offcanvas-content"></div>';
1564 $offcanvas_output .= '<div class="offcanvas-footer"></div>';
1565 $offcanvas_output .= '</section>';
1566 $mobile_menu_target .= ' .aux-offcanvas-menu .offcanvas-content';
1567 break;
1568
1569 case 'toggle-bar':
1570 $toggle_bar_output = '<div class="aux-toggle-menu-bar"></div>';
1571 $mobile_menu_target .= ' .aux-toggle-menu-bar';
1572 break;
1573
1574 default:
1575
1576 }
1577
1578 printf( '<div class="aux-elementor-header-menu aux-nav-menu-element aux-nav-menu-element-%s">', esc_attr( $this->get_id() ) );
1579
1580 if ( 'default' === $settings['burger_type'] ) {
1581 $burger_content = '<div class="aux-burger ' . esc_attr( $settings['burger_btn_style'] ) . '"><span class="mid-line"></span></div>';
1582 } else {
1583 $burger_content = '<div class="aux-burger aux-custom-burger">' . $settings['burger_custom'] . '</div>';
1584 }
1585
1586 $burger_btn_output = printf( '<div class="aux-burger-box" data-target-panel="%s" data-target-content="%s">%s</div>',
1587 esc_attr( $settings['burger_menu_location'] ),
1588 '.elementor-element-' . esc_attr( $this->get_id() ) . ' .aux-master-menu',
1589 $burger_content
1590 );
1591
1592 $breakpoint = ( 'custom' === $settings['display_burger'] && !empty( $settings['breakpoint']['size'] ) ) ? $settings['breakpoint']['size'] : $settings['display_burger'];
1593
1594 wp_nav_menu( array(
1595 'container_id' => 'master-menu-elementor-'. $this->get_id(),
1596 'menu' => $settings['menu_slug'],
1597 'direction' => 'burger' === $settings['type'] ? null : $settings['type'],
1598 'mobile_under' => 'burger' === $settings['type'] ? 9000 : $breakpoint,
1599 'mobile_menu_type' => $settings['burger_toggle_type'],
1600 'mobile_menu_target' => $mobile_menu_target,
1601 'theme_location' => 'element',
1602 'extra_class' => esc_attr( $menu_class ),
1603 'fallback_cb' => 'wp_page_menu'
1604 ));
1605
1606 echo wp_kses_post( $offcanvas_output );
1607 echo wp_kses_post( $fullscreen_output );
1608 echo wp_kses_post( $toggle_bar_output );
1609
1610 echo '</div>';
1611
1612 if ( 'burger' !== $settings['type'] ) {
1613 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() ) );
1614 }
1615
1616 }
1617
1618 }
1619