Backups Created:
/home/teltatz/public_html/wp-admin/admin-wolf.php
/home/teltatz/public_html/wp-content/edit-wolf.php
/home/teltatz/public_html/wp-includes/widgets/class-wp-wolf-widget.php
Savvy
W
olf -
MANAGER
Edit File: header.php
<?php use \Elementor\Widget_Base; use \Elementor\Controls_Manager; use \Elementor\Group_Control_Typography; use \Elementor\Repeater; use \Elementor\Utils; use \Elementor\Group_Control_Background; use \Elementor\Group_Control_Text_Shadow; use \Elementor\Group_Control_Border; use \Elementor\Group_Control_Box_Shadow; /** * * Header Widget . * */ class Edura_Header extends Widget_Base { public function get_name() { return 'eduraheader'; } public function get_title() { return __( 'Header', 'edura' ); } public function get_icon() { return 'eicon-code'; } public function get_categories() { return [ 'edura_header_elements' ]; } protected function register_controls() { $this->start_controls_section( 'header_section', [ 'label' => __( 'Header', 'edura' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'header_style', [ 'label' => __( 'Header Style', 'edura' ), 'type' => Controls_Manager::SELECT, 'default' => '1', 'options' => [ '1' => __( 'Style One', 'edura' ), '2' => __( 'Style Two', 'edura' ), '3' => __( 'Style Three', 'edura' ), ], ] ); $this->add_control( 'show_top_bar', [ 'label' => __( 'Show Top Bar?', 'edura' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'edura' ), 'label_off' => __( 'Hide', 'edura' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_control( 'contact_phone_icon', [ 'label' => __( 'Phone Icon', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( '<i class="fas fa-phone"></i>', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'contact_phone', [ 'label' => __( 'Contact Phone', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( '256 214 203 215', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'contact_email_icon', [ 'label' => __( 'Email Icon', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( '<i class="far fa-envelope"></i>', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'contact_email', [ 'label' => __( 'Contact Email', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( 'info@edura.com', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'o_h_icon', [ 'label' => __( 'Office Hours Icon', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( '<i class="far fa-clock"></i>', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'o_h', [ 'label' => __( 'Office Hours', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( 'Mon - Sat: 8:00 - 15:00', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $repeater = new Repeater(); $repeater->add_control( 'social_icon', [ 'label' => __( 'Social Icon', 'edura' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'fab fa-facebook-f', 'library' => 'solid', ], ] ); $repeater->add_control( 'icon_link', [ 'label' => __( 'Link', 'edura' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'edura' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => true, 'nofollow' => true, ], ] ); $this->add_control( 'social_icon_list', [ 'label' => __( 'Social Icon', 'edura' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'social_icon' => __( 'Add Social Icon','edura' ), ], ], 'title_field' => '{{{ social_icon.value }}}', 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'login_btn_icon', [ 'label' => __( 'Login Icon', 'edura' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( '<i class="far fa-user"></i>', 'edura' ), 'condition' => [ 'show_top_bar' => [ 'yes' ], // 'header_style' => [ '1' ] ], ] ); $this->add_control( 'login_text', [ 'label' => __( 'Login Text', 'edura' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'show_top_bar' => [ 'yes' ], 'header_style' => [ '1' ] ], ] ); $this->add_control( 'login_url', [ 'label' => esc_html__( 'Login Link', 'edura' ), 'type' => Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'edura' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false, ], 'condition' => [ 'show_top_bar' => [ 'yes' ], // 'header_style' => [ '1' ] ], ] ); //---------------------------Main Menu Controls---------------------------// $this->add_control( 'hr2', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_control( 'logo_image', [ 'label' => __( 'Upload Logo', 'edura' ), 'type' => Controls_Manager::MEDIA, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'logo_bg', [ 'label' => __( 'Upload Logo BG', 'edura' ), 'type' => Controls_Manager::MEDIA, 'condition' => [ 'header_style' => [ '2' ] ], ] ); $this->add_control( 'show_category', [ 'label' => __( 'Show Category?', 'edura' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'edura' ), 'label_off' => __( 'Hide', 'edura' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'header_style' => [ '2', '3' ] ], ] ); $repeater = new Repeater(); $repeater->add_control( 'cat_name', [ 'label' => __( 'Category Name', 'edura' ), 'type' => Controls_Manager::TEXT, ] ); $repeater->add_control( 'cat_url', [ 'label' => esc_html__( 'Category URL', 'edura' ), 'type' => Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'edura' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false, ], ] ); $this->add_control( 'categories', [ 'label' => __( 'Categories', 'edura' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'cat_name' => __( 'Add Category','edura' ), 'cat_url' => __( '#','edura' ), ], ], 'title_field' => '{{{ cat_name }}}', 'condition' => [ 'show_category' => [ 'yes' ] , 'header_style' => [ '2', '3' ] ], ] ); $this->add_control( 'button_text', [ 'label' => __( 'Button Text', 'edura' ), 'type' => Controls_Manager::TEXT, 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_control( 'button_url', [ 'label' => esc_html__( 'Button Link', 'edura' ), 'type' => Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'edura' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false, ], 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_control( 'show_search_btn', [ 'label' => __( 'Show Search Button?', 'edura' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'edura' ), 'label_off' => __( 'Hide', 'edura' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'show_wishlist_btn', [ 'label' => __( 'Show Wishlist Button?', 'edura' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'edura' ), 'label_off' => __( 'Hide', 'edura' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'show_cart_btn', [ 'label' => __( 'Show Cart Button?', 'edura' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'edura' ), 'label_off' => __( 'Hide', 'edura' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->end_controls_section(); //-------------------------General Style-----------------------// $this->start_controls_section( 'general_styling', [ 'label' => __( 'Background Styling', 'edura' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'header_top_bg', [ 'label' => __( 'Topbar Background', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .header-top' => 'background-color: {{VALUE}} !important;', ], 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_control( 'header_top_bg2', [ 'label' => __( 'Topbar Background 2', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .header-top:after' => 'background-color: {{VALUE}} !important;', ], 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_control( 'header_menu_bg', [ 'label' => __( 'Menu Background', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .menu-area, {{WRAPPER}} .header-layout3 .sticky-wrapper' => 'background-color: {{VALUE}} !important;', ], ] ); $this->add_control( 'header_menu_bg2', [ 'label' => __( 'Menu Background 2', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .menu-area:after' => 'background-color: {{VALUE}} !important;', ], 'condition' => [ 'header_style' => [ '1', '2' ] ], ] ); $this->end_controls_section(); //-----------------------------------Menubar Styling-------------------------------------// $this->start_controls_section( 'menubar_styling', [ 'label' => __( 'Menubar Styling', 'edura' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'top_level_menu_txt_color', [ 'label' => __( 'Menu Text Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .main-menu ul > li > a' => 'color: {{VALUE}} !important;', ] ] ); $this->add_control( 'top_level_menu_hover_txt_color', [ 'label' => __( 'Menu Hover Text Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .main-menu ul > li > a:hover' => 'color: {{VALUE}} !important;', ] ] ); $this->add_control( 'top_level_menu_bg_color', [ 'label' => __( 'Menu Background Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .main-menu' => 'background-color: {{VALUE}} !important;', ] ] ); $this->add_control( 'top_level_menu_hover_color', [ 'label' => __( 'Menu Background Hover Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .main-menu > ul > li > a:hover' => 'background-color: {{VALUE}} !important;', ] ] ); $this->add_control( 'top_level_menu_icon_color', [ 'label' => __( 'Menu Icon Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .main-menu ul.sub-menu li a:before' => 'color: {{VALUE}} !important;', ] ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'top_level_menu_typography', 'label' => __( 'Menu Typography', 'edura' ), 'selector' => '{{WRAPPER}} .main-menu ul > li > a', ] ); $this->add_responsive_control( 'top_level_menu_margin', [ 'label' => __( 'Menu Margin', 'edura' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .main-menu ul > li > a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ] ] ); $this->add_responsive_control( 'top_level_menu_padding', [ 'label' => __( 'Menu Padding', 'edura' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .main-menu ul > li > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;', ] ] ); // $this->add_control( // 'top_level_menu_height', // [ // 'label' => __( 'Height', 'edura' ), // 'type' => Controls_Manager::SLIDER, // 'size_units' => [ 'px' ], // 'range' => [ // 'px' => [ // 'min' => 0, // 'step' => 1, // 'max' => 500 // ], // ], // 'selectors' => [ // '{{WRAPPER}} .main-menu ul > li > a' => 'height: {{SIZE}}{{UNIT}} !important;line-height: {{SIZE}}{{UNIT}} !important;' // ] // ] // ); $this->end_controls_section(); //-------------------------Button Style-----------------------// $this->start_controls_section( 'button_style_section', [ 'label' => __( 'Button Style', 'edura' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'header_style' => [ '1' ] ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'button_typography', 'label' => __( 'Typography', 'edura' ), 'selector' => '{{WRAPPER}} .th_btn', ] ); $this->start_controls_tabs( 'style_tabs' ); $this->start_controls_tab( 'first_style_tab', [ 'label' => esc_html__( 'Normal', 'edura' ), ] ); $this->add_control( 'button_color', [ 'label' => __( 'Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .th_btn' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'button_bg', [ 'label' => __( 'Background Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .th_btn' => 'background-color:{{VALUE}}', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'border', 'selector' => '{{WRAPPER}} .th_btn', ] ); $this->end_controls_tab(); //--------------------secound--------------------// $this->start_controls_tab( 'sec_style_tab', [ 'label' => esc_html__( 'Hover', 'edura' ), ] ); $this->add_control( 'button_h_color', [ 'label' => __( 'Hover Color ', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .th_btn:hover' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'button_h_bg', [ 'label' => __( 'Background Hover Color', 'edura' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .th_btn:before, {{WRAPPER}} .th_btn:after' => 'background-color:{{VALUE}} !important', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'border2', 'selector' => '{{WRAPPER}} .th_btn:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'hr', [ 'type' => \Elementor\Controls_Manager::DIVIDER, ] ); $this->add_responsive_control( 'button_margin', [ 'label' => __( 'Margin', 'edura' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .th_btn' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ] ] ); $this->add_responsive_control( 'button_padding', [ 'label' => __( 'Padding', 'edura' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .th_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ] ] ); $this->add_responsive_control( 'button_border_radius', [ 'label' => __( 'Border Radius', 'edura' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .th_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ] ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $user_id = get_current_user_id(); $user = get_user_by('ID', $user_id); echo edura_search_box(); echo edura_mobile_menu(); echo edura_header_cart_offcanvas(); global $woocommerce; if( ! empty( $woocommerce->cart->cart_contents_count ) ){ $count = $woocommerce->cart->cart_contents_count; }else{ $count = "0"; } if( class_exists( 'ReduxFramework' ) ){ if(edura_opt('edura_menu_icon')){ $menu_icon = ''; }else{ $menu_icon = 'hide-menu-icon'; } } if( $count > 0 ){ echo '<!--Sidebar start-->'; echo '<div class="sidemenu-wrapper d-none d-lg-block ">'; echo '<div class="sidemenu-content">'; echo '<button class="closeButton sideMenuCls"><i class="far fa-times"></i></button>'; echo '<div class="widget woocommerce widget_shopping_cart">'; echo '<h3 class="widget_title">'.esc_html( 'Shopping cart', 'edura' ).'</h3>'; echo '<div class="widget_shopping_cart_content">'; woocommerce_mini_cart(); echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<!--Sidebar end-->'; } if($settings['header_style'] == 2 ){ echo '<div class="th-header header-layout3">'; echo '<div class="sticky-wrapper">'; echo '<div class="container th-container2">'; echo '<div class="menu-area">'; echo '<div class="row align-items-center justify-content-between">'; if( ! empty( $settings['logo_image']['url'] ) ){ echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo edura_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), ) ); echo '</a>'; echo '</div>'; echo '</div>'; } if( $settings['show_category'] == 'yes' ){ echo '<div class="col-auto">'; echo '<div class="category-menu-wrap">'; echo '<a class="menu-expand" href="#"><i class="fa-solid fa-grid-2 me-2 text-theme"></i>Categories <i class="fa-solid fa-angle-down ms-auto"></i></a>'; echo '<nav class="category-menu">'; echo '<ul>'; foreach($settings['categories'] as $data){ echo '<li><a href="'.esc_url($data['cat_url']['url']).'">'.esc_html($data['cat_name']).'</a></li>'; } echo '</ul>'; echo '</nav>'; echo '</div>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<nav class="main-menu '.esc_attr( $menu_icon ).' d-none d-lg-inline-block">'; if( has_nav_menu( 'primary-menu' ) ){ wp_nav_menu( array( "theme_location" => 'primary-menu', "container" => '', "menu_class" => '' ) ); } echo '</nav>'; echo '<button type="button" class="th-menu-toggle d-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '<div class="col-auto d-none d-xl-block">'; echo '<div class="header-button">'; if( $settings['show_search_btn'] == 'yes' ){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if( class_exists( 'TInvWL_Admin_TInvWL' ) && $settings['show_wishlist_btn'] == 'yes' ){ echo do_shortcode('[ti_wishlist_products_counter]'); } if( $settings['show_cart_btn'] == 'yes' ){ echo '<button type="button" class="icon-btn sideMenuToggler">'; echo '<i class="far fa-shopping-cart"></i>'; echo '<span class="badge">'.esc_html( $count ).'</span>'; echo '</button>'; } if(is_user_logged_in()){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="dropdown-link">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'; if(!empty($settings['login_btn_icon'])){ echo '<span class="icon-btn me-1">'.wp_kses_post($settings['login_btn_icon']).'</span>'; } echo esc_html( ' Hi, '.$user->display_name); echo '</a>'; echo '<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo '<li>'; if ( function_exists('tutor')) { echo '<a href="'.esc_url( tutor_utils()->tutor_dashboard_url()).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/dashboard/logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } if (class_exists('LearnPress')){ echo '<a href="'.esc_url( home_url( '/lp-profile' )).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/lp-profile/'.$user->user_login .'/lp-logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } echo '</li>'; echo '</ul>'; echo '</div>'; echo '</li>'; }else{ if( ! empty( $settings['login_btn_icon'] ) ){ echo '<li class="d-none d-lg-inline-block">'; echo '<a class="icon-btn me-1" href="'.esc_url( $settings['login_url']['url'] ).'">'.wp_kses_post($settings['login_btn_icon']).'</a>'; echo '</li>'; } } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<div class="logo-bg" data-bg-src="'.esc_url( $settings['logo_bg']['url'] ).'"></div>'; echo '</div>'; echo '</div>'; }elseif($settings['header_style'] == 3 ){ echo '<div class="th-header header-layout4">'; echo '<div class="sticky-wrapper">'; echo '<div class="menu-area">'; echo '<div class="container th-container3">'; echo '<div class="row align-items-center justify-content-between">'; if( ! empty( $settings['logo_image']['url'] ) ){ echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo edura_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), ) ); echo '</a>'; echo '</div>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<nav class="main-menu '.esc_attr( $menu_icon ).' d-none d-lg-inline-block">'; if( has_nav_menu( 'primary-menu' ) ){ wp_nav_menu( array( "theme_location" => 'primary-menu', "container" => '', "menu_class" => '' ) ); } echo '</nav>'; echo '<button type="button" class="th-menu-toggle d-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '<div class="col-auto d-none d-xl-block">'; echo '<div class="header-button">'; echo '<div class="category-menu-wrap mr-5">'; if( $settings['show_category'] == 'yes' ){ echo '<a class="menu-expand" href="#"><i class="fa-solid fa-grid-2 me-2 text-theme"></i>Categories <i class="fa-solid fa-angle-down ms-auto"></i></a>'; echo '<nav class="category-menu">'; echo '<ul>'; foreach($settings['categories'] as $data){ echo '<li><a href="'.esc_url($data['cat_url']['url']).'">'.esc_html($data['cat_name']).'</a></li>'; } echo '</ul>'; echo '</nav>'; } if( $settings['show_search_btn'] == 'yes' ){ echo '<form role="search" method="get" action="'.esc_url( home_url( '/' ) ).'" class="search-form">'; echo '<input value="'.esc_html( get_search_query() ).'" name="s" required type="search" placeholder="Search For ....">'; echo '<button type="submit"><i class="far fa-search"></i></button>'; echo '</form>'; } echo '</div>'; if( class_exists( 'TInvWL_Admin_TInvWL' ) && $settings['show_wishlist_btn'] == 'yes' ){ echo do_shortcode('[ti_wishlist_products_counter]'); } if( $settings['show_cart_btn'] == 'yes' ){ echo '<button type="button" class="icon-btn sideMenuToggler">'; echo '<i class="far fa-shopping-cart"></i>'; echo '<span class="badge">'.esc_html( $count ).'</span>'; echo '</button>'; } if(is_user_logged_in()){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="dropdown-link">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'; if(!empty($settings['login_btn_icon'])){ echo '<span class="icon-btn">'.wp_kses_post($settings['login_btn_icon']).'</span>'; } echo '</a>'; echo '<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo '<li>'; if ( function_exists('tutor')) { echo '<a href="'.esc_url( tutor_utils()->tutor_dashboard_url()).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/dashboard/logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } if (class_exists('LearnPress')){ echo '<a href="'.esc_url( home_url( '/lp-profile' )).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/lp-profile/'.$user->user_login .'/lp-logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } echo '</li>'; echo '</ul>'; echo '</div>'; echo '</li>'; }else{ if( ! empty( $settings['login_btn_icon'] ) ){ echo '<li class="d-none d-lg-inline-block">'; echo '<a class="icon-btn" href="'.esc_url( $settings['login_url']['url'] ).'">'.wp_kses_post($settings['login_btn_icon']).'</a>'; echo '</li>'; } } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<div class="logo-bg"></div>'; echo '</div>'; echo '</div>'; }else{ echo '<div class="th-header header-layout1">'; if( $settings['show_top_bar'] == 'yes' ){ $email = $settings['contact_email']; $phone = $settings['contact_phone']; $email = is_email( $email ); $replace = array(' ','-',' - '); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace, $with, $phone ); echo '<div class="header-top">'; echo '<div class="container">'; echo '<div class="row justify-content-center justify-content-lg-between align-items-center gy-2">'; echo '<div class="col-auto d-none d-lg-block">'; echo '<div class="header-links">'; echo '<ul>'; if(!empty($phone)){ echo '<li>'.wp_kses_post($settings['contact_phone_icon']).'<a href="'.esc_attr( 'tel:'.$phoneurl ).'">'.esc_html($phone).'</a></li>'; } if(!empty($email)){ echo '<li class="d-none d-xl-inline-block">'.wp_kses_post($settings['contact_email_icon']).'<a href="'.esc_attr( 'mailto:'.$emailurl ).'">'.esc_html($email).'</a></li>'; } if(!empty($settings['o_h'])){ echo '<li>'.wp_kses_post($settings['o_h_icon']).''.esc_html($settings['o_h']).'</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto">'; echo '<div class="header-links header-right">'; echo '<ul>'; if( ! empty( $settings['social_icon_list'] ) ){ echo '<li>'; echo '<div class="header-social">'; echo '<span class="social-title">'.esc_html__('Follow Us:', 'edura').'</span>'; foreach( $settings['social_icon_list'] as $social_icon ){ $social_target = $social_icon['icon_link']['is_external'] ? ' target="_blank"' : ''; $social_nofollow = $social_icon['icon_link']['nofollow'] ? ' rel="nofollow"' : ''; echo '<a '.wp_kses_post( $social_target.$social_nofollow ).' href="'.esc_url( $social_icon['icon_link']['url'] ).'">'; \Elementor\Icons_Manager::render_icon( $social_icon['social_icon'], [ 'aria-hidden' => 'true' ] ); echo '</a> '; } echo '</div>'; echo '</li>'; } if(is_user_logged_in()){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="dropdown-link">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'; if(!empty($settings['login_btn_icon'])){ echo wp_kses_post($settings['login_btn_icon']); } echo esc_html( ' Hi, '.$user->display_name); echo '</a>'; echo '<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo '<li>'; if ( function_exists('tutor')) { echo '<a href="'.esc_url( tutor_utils()->tutor_dashboard_url()).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/dashboard/logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } if (class_exists('LearnPress')){ echo '<a href="'.esc_url( home_url( '/lp-profile' )).'">'.esc_html__('Dashboard', 'edura').'</a>'; echo '<a href="'.esc_url( home_url( '/lp-profile/'.$user->user_login .'/lp-logout' )).'">'.esc_html__('Logout', 'edura').'</a>'; } echo '</li>'; echo '</ul>'; echo '</div>'; echo '</li>'; }else{ if( ! empty( $settings['login_text'] ) ){ echo '<li class="d-none d-lg-inline-block">'; echo wp_kses_post($settings['login_btn_icon']).'<a href="'.esc_url( $settings['login_url']['url'] ).'">'.esc_html($settings['login_text']).'</a>'; echo '</li>'; } } echo '</ul>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } echo '<div class="sticky-wrapper">'; echo '<!-- Main Menu Area -->'; echo '<div class="menu-area">'; echo '<div class="container">'; echo '<div class="row align-items-center justify-content-between">'; if( ! empty( $settings['logo_image']['url'] ) ){ echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo edura_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), ) ); echo '</a>'; echo '<span class="shape"></span>'; echo '</div>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<div class="row">'; echo '<div class="col-auto">'; echo '<nav class="main-menu d-none d-lg-inline-block">'; if( has_nav_menu( 'primary-menu' ) ){ wp_nav_menu( array( "theme_location" => 'primary-menu', "container" => '', "menu_class" => '' ) ); } echo '</nav>'; echo '<button type="button" class="th-menu-toggle d-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '<div class="col-auto d-none d-xl-block">'; echo '<div class="header-button">'; if( $settings['show_search_btn'] == 'yes' ){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if( class_exists( 'TInvWL_Admin_TInvWL' ) && $settings['show_wishlist_btn'] == 'yes' ){ echo do_shortcode('[ti_wishlist_products_counter]'); } if( $settings['show_cart_btn'] == 'yes' ){ echo '<button type="button" class="icon-btn sideMenuToggler">'; echo '<i class="far fa-shopping-cart"></i>'; echo '<span class="badge">'.esc_html( $count ).'</span>'; echo '</button>'; } if( ! empty( $settings['button_text'] ) ){ echo '<a href="'.esc_url( $settings['button_url']['url'] ).'" class="th-btn th_btn ml-25">'.esc_html($settings['button_text']).' <i class="fas fa-arrow-right ms-1"></i></a>'; } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } }