start_controls_section( 'section_menu', [ 'label' => esc_html__( 'Menu', 'nighty' ), ] ); $menus = \wp_get_nav_menus(); $list_menu = array(); foreach ($menus as $menu) { $list_menu[$menu->slug] = $menu->name; } $this->add_control( 'menu_slug', [ 'label' => esc_html__( 'Select Menu', 'nighty' ), 'type' => Controls_Manager::SELECT, 'options' => $list_menu, 'default' => '', ] ); $this->end_controls_section(); $this->start_controls_section( 'menu_style', [ 'label' => esc_html__( 'Menu', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'menu_view', [ 'label' => esc_html__( 'Layout', 'nighty' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'block' => [ 'title' => esc_html__( 'Default', 'nighty' ), 'icon' => 'eicon-editor-list-ul', ], 'inline-flex' => [ 'title' => esc_html__( 'Inline Flex', 'nighty' ), 'icon' => 'eicon-ellipsis-h', ], ], 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer ul' => 'display: {{VALUE}};', ], ] ); $this->add_control( 'menu_bg', [ 'label' => esc_html__( 'Background', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu' => 'background-color: {{VALUE}}', ], ] ); $this->start_controls_tabs( 'tabs_title_style' ); $this->start_controls_tab( 'tab_text_normal', [ 'label' => esc_html__( 'Normal', 'nighty' ), ] ); $this->add_control( 'menu_color_normal', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li > a' => 'color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_text_hover', [ 'label' => esc_html__( 'Hover', 'nighty' ), ] ); $this->add_control( 'menu_color_hover', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li:hover > a' => 'color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'text_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'text_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'text_typography', 'selector' => '{{WRAPPER}} .ova-menu-footer .menu li a', ] ); $this->end_controls_section(); /* End Menu Style */ /* Begin Menu Style */ $this->start_controls_section( 'sub_menu_style', [ 'label' => esc_html__( 'Sub Menu', 'nighty' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'sub_menu_bg', [ 'label' => esc_html__( 'Background', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu' => 'background-color: {{VALUE}}', ], ] ); $this->start_controls_tabs( 'tabs_subtitle_style' ); $this->start_controls_tab( 'tab_subtext_normal', [ 'label' => esc_html__( 'Normal', 'nighty' ), ] ); $this->add_control( 'sub_menu_color_normal', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu li a' => 'color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_subtext_hover', [ 'label' => esc_html__( 'Hover', 'nighty' ), ] ); $this->add_control( 'sub_menu_color_hover', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu li:hover a' => 'color: {{VALUE}}', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'subtext_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'subtext_padding', [ 'label' => esc_html__( 'Padding', 'nighty' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'subtext_typography', 'selector' => '{{WRAPPER}} .ova-menu-footer .menu li .sub-menu li a', ] ); $this->end_controls_section(); } // Render Template Here protected function render() { $settings = $this->get_settings(); $menu_slug = $settings['menu_slug']; ?> register( new Nighty_Elementor_Menu_Footer() );