X7ROOT File Manager
Current Path:
/home/notabjze/boatingnight.com/wp-content/themes/yachbat/elementor/widgets
home
/
notabjze
/
boatingnight.com
/
wp-content
/
themes
/
yachbat
/
elementor
/
widgets
/
ðŸ“
..
📄
blog-2.php
(32.12 KB)
📄
blog-3.php
(32.14 KB)
📄
blog.php
(26.72 KB)
📄
button.php
(7.74 KB)
📄
contact-info-2.php
(18.51 KB)
📄
contact-info.php
(16.1 KB)
📄
counter.php
(11.48 KB)
📄
gallery.php
(10.01 KB)
📄
header-banner.php
(8.8 KB)
📄
heading.php
(7.44 KB)
📄
logo.php
(8.05 KB)
📄
menu-canvas.php
(5.35 KB)
📄
menu-footer.php
(4.41 KB)
📄
menu-nav.php
(6.68 KB)
📄
product-list.php
(23.39 KB)
📄
special-offer.php
(18.39 KB)
📄
switch-language.php
(4.66 KB)
📄
tabs.php
(60.94 KB)
📄
testimonial-carousel.php
(28.97 KB)
📄
toggle.php
(49.56 KB)
Editing: menu-nav.php
<?php use Elementor\Widget_Base; use Elementor\Controls_Manager; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Yachbat_Elementor_Menu_Nav extends Widget_Base { public function get_name() { return 'yachbat_elementor_menu_nav'; } public function get_title() { return esc_html__( 'Menu', 'yachbat' ); } public function get_icon() { return 'eicon-nav-menu'; } public function get_categories() { return [ 'hf' ]; } protected function register_controls() { /* Global Section *******************************/ /***********************************************/ $this->start_controls_section( 'section_menu_type', [ 'label' => esc_html__( 'Global', 'yachbat' ), ] ); $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', 'yachbat' ), 'type' => Controls_Manager::SELECT, 'options' => $list_menu, 'default' => '', 'prefix_class' => 'elementor-view-', ] ); $this->end_controls_section(); /* Parent Menu Section *******************************/ /***********************************************/ $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Parent Menu', 'yachbat' ), ] ); // Typography Parent Menu $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'menu_typography', 'selector' => '{{WRAPPER}} ul li a' ] ); // Control Tabs $this->start_controls_tabs( 'style_parent_menu_tabs' ); // Normal Tab $this->start_controls_tab( 'style_parent_menu_normal_tab', [ 'label' => esc_html__( 'Normal', 'yachbat' ), ] ); $this->add_control( 'link_color', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.menu > li > a' => 'color: {{VALUE}};', ], 'separator' => 'before' ] ); $this->end_controls_tab(); // Hover Tab $this->start_controls_tab( 'style_parent_menu_hover_tab', [ 'label' => esc_html__( 'Hover', 'yachbat' ), ] ); $this->add_control( 'link_color_hover', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.menu > li > a:hover' => 'color: {{VALUE}};', ] ] ); $this->end_controls_tab(); // Active Tab $this->start_controls_tab( 'style_parent_menu_active_tab', [ 'label' => esc_html__( 'Active', 'yachbat' ), ] ); $this->add_control( 'link_color_active', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.menu > li.current-menu-item > a' => 'color: {{VALUE}};', ] ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* Sub Menu Section *******************************/ /***********************************************/ $this->start_controls_section( 'section_submenu_content', [ 'label' => esc_html__( 'Sub Menu', 'yachbat' ), ] ); // Typography SubMenu $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'submenu_typography', 'selector' => '{{WRAPPER}} ul.sub-menu li a' ] ); // Background Submenu $this->add_control( 'submenu_bg_color', [ 'label' => esc_html__( 'Background', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.sub-menu' => 'background-color: {{VALUE}};', ] ] ); // Background Item Hover In Submenu $this->add_control( 'submenu_bg_item_hover_color', [ 'label' => esc_html__( 'Background Item Hover', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.sub-menu li a:hover' => 'background-color: {{VALUE}};', ] ] ); // Control Tabs $this->start_controls_tabs( 'style_sub_menu_tabs' ); // Normal Tab $this->start_controls_tab( 'style_sub_menu_normal_tab', [ 'label' => esc_html__( 'Normal', 'yachbat' ), ] ); $this->add_control( 'submenu_link_color', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.sub-menu li a' => 'color: {{VALUE}};', ] ] ); $this->end_controls_tab(); // Hover Tab $this->start_controls_tab( 'style_sub_menu_hover_tab', [ 'label' => esc_html__( 'Hover', 'yachbat' ), ] ); $this->add_control( 'submenu_link_color_hover', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.sub-menu li a:hover' => 'color: {{VALUE}};', ] ] ); $this->end_controls_tab(); // Active Tab $this->start_controls_tab( 'style_sub_menu_active_tab', [ 'label' => esc_html__( 'Active', 'yachbat' ), ] ); $this->add_control( 'submenu_link_color_active', [ 'label' => esc_html__( 'Menu Color', 'yachbat' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} ul.sub-menu li.current-menu-item > a' => 'color: {{VALUE}};', ] ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * * @access protected */ protected function render() { $settings = $this->get_settings(); ?> <nav class="main-navigation"> <button class="menu-toggle"> <span> <?php echo esc_html__( 'Menu', 'yachbat' ); ?> </span> </button> <?php wp_nav_menu( [ 'theme_location' => $settings['menu_slug'], 'container_class' => 'primary-navigation', 'menu' => $settings['menu_slug'], ] ); ?> </nav> <?php } } $widgets_manager->register_widget_type( new Yachbat_Elementor_Menu_Nav() );
Upload File
Create Folder