Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
poolax-core
/
addons
/
header
/
File Content:
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 Poolax_Header extends Widget_Base { public function get_name() { return 'poolaxheader'; } public function get_title() { return __( 'Header', 'poolax' ); } public function get_icon() { return 'th-icon'; } public function get_categories() { return [ 'poolax_header_elements' ]; } protected function register_controls() { $this->start_controls_section( 'layout_section', [ 'label' => __( 'Header', 'poolax' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout_style', [ 'label' => __( 'Layout Style', 'poolax' ), 'type' => Controls_Manager::SELECT, 'options' => [ '1' => __( 'Style One', 'poolax' ), '2' => __( 'Style Two', 'poolax' ), '3' => __( 'Style Three', 'poolax' ), '4' => __( 'Style Four', 'poolax' ), '5' => __( 'Style Five', 'poolax' ), '6' => __( 'Style Six', 'poolax' ), ], 'default' => '1', ] ); $this->add_control( 'show_top_bar', [ 'label' => __( 'Show Top Bar?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'topbar_slogan', [ 'label' => __( 'Topbar Slogan', 'poolax' ), 'type' => Controls_Manager::TEXTAREA, 'rows' => 2, 'default' => __( 'Welcome to Pool Cleaning & Services Company', 'poolax' ), 'condition' => [ 'show_top_bar' => [ 'yes' ] , 'layout_style' => ['1', '3', '4'] ], ] ); $this->add_control( 'topbar_email_label', [ 'label' => __( 'Email Label', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Email Address', 'poolax' ), 'label_block' => true, 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1'] ], ] ); $this->add_control( 'topbar_email_icon', [ 'label' => __( 'Email Icon', 'poolax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => '<i class="fa-thin fa-envelope"></i>', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '2', '4', '5', '6'] ], ] ); $this->add_control( 'topbar_email', [ 'label' => __( 'Email Address', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'info@poolax.com', 'poolax' ), 'label_block' => true, 'separator' => 'after', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '2', '4', '5', '6'] ], ] ); $this->add_control( 'topbar_phone_label', [ 'label' => __( 'Phone Label', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Phone Number:', 'poolax' ), 'label_block' => true, 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '3'] ], ] ); $this->add_control( 'topbar_phone_icon', [ 'label' => __( 'Phone Icon', 'poolax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => '<i class="fa-thin fa-phone"></i>', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'topbar_phone', [ 'label' => __( 'Phone Number', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( '(+468) 254 762 443', 'poolax' ), 'label_block' => true, 'separator' => 'after', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'topbar_address_icon', [ 'label' => __( 'Address Iocn', 'poolax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => '<i class="fa-thin fa-map-location-dot"></i>', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['2', '4', '5', '6'] ], ] ); $this->add_control( 'topbar_address', [ 'label' => __( 'Address', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( '25 Street, 145 City, USA', 'poolax' ), 'label_block' => true, 'separator' => 'after', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['2', '4', '5', '6'] ], ] ); //Language $this->add_control( 'show_lang', [ 'label' => __( 'Show Language?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'show_top_bar' => ['yes'], 'layout_style' => ['1', '3', '4', '5'] ], ] ); //Social $this->add_control( 'show_social', [ 'label' => __( 'Show Social?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', 'separator' => 'before', 'condition' => [ 'show_top_bar' => ['yes'], ], ] ); $this->add_control( 'social_text', [ 'label' => __( 'Social Text', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Follow Us On:', 'poolax' ), 'label_block' => true, 'condition' => [ 'show_social' => 'yes', 'show_top_bar' => ['yes'], ], ] ); $repeater = new Repeater(); $repeater->add_control( 'social_icon', [ 'label' => __( 'Social Icon', 'poolax' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'fab fa-facebook-f', 'library' => 'solid', ], ] ); $repeater->add_control( 'icon_link', [ 'label' => __( 'Link', 'poolax' ), 'type' => Controls_Manager::URL, 'placeholder' => __( 'https://your-link.com', 'poolax' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => true, ], ] ); $this->add_control( 'social_icon_list', [ 'label' => __( 'Social Icon', 'poolax' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'social_icon' => ['value' => 'fab fa-facebook-f', 'library' => 'solid'], 'icon_link' => ['url' => 'https://www.facebook.com', 'is_external' => false, 'nofollow' => true], ], [ 'social_icon' => ['value' => 'fab fa-twitter', 'library' => 'solid'], 'icon_link' => ['url' => 'https://www.twitter.com', 'is_external' => false, 'nofollow' => true], ], [ 'social_icon' => ['value' => 'fab fa-instagram', 'library' => 'solid'], 'icon_link' => ['url' => 'https://www.instagram.com', 'is_external' => false, 'nofollow' => true], ], [ 'social_icon' => ['value' => 'fab fa-linkedin-in', 'library' => 'solid'], 'icon_link' => ['url' => 'https://www.linkedin.com', 'is_external' => false, 'nofollow' => true], ], [ 'social_icon' => ['value' => 'fab fa-pinterest-p', 'library' => 'solid'], 'icon_link' => ['url' => 'https://pinterest.com', 'is_external' => false, 'nofollow' => true], ], ], 'condition' => [ 'show_social' => 'yes', 'show_top_bar' => ['yes'], ], ] ); $this->add_control( 'logo_image', [ 'label' => __( 'Upload Logo', 'poolax' ), 'type' => Controls_Manager::MEDIA, ] ); $menus = $this->poolax_menu_select(); if( !empty( $menus ) ){ $this->add_control( 'poolax_menu_select', [ 'label' => __( 'Select Poolax Menu', 'poolax' ), 'type' => Controls_Manager::SELECT, 'options' => $menus, 'description' => sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus.', 'poolax' ), admin_url( 'nav-menus.php' ) ), ] ); }else { $this->add_control( 'no_menu', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => '<strong>' . __( 'There are no menus in your site.', 'poolax' ) . '</strong><br>' . sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'poolax' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ), 'separator' => 'after', 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info', ] ); } $this->add_control( 'show_search_btn', [ 'label' => __( 'Show Search Button?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'layout_style' => ['1', '2', '5', '6'] ], ] ); $this->add_control( 'show_offcanvas_btn', [ 'label' => __( 'Show Offcanvas Button?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'show_btn', [ 'label' => __( 'Show Button?', 'poolax' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'poolax' ), 'label_off' => __( 'Hide', 'poolax' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'button_text', [ 'label' => __( 'Button Text', 'poolax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => __( 'REGISTER NOW', 'poolax' ), 'condition' => [ 'show_btn' => [ 'yes' ], 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'button_url', [ 'label' => esc_html__( 'Button Link', 'poolax' ), 'type' => Controls_Manager::URL, 'placeholder' => esc_html__( 'https://your-link.com', 'poolax' ), 'show_external' => true, 'default' => [ 'url' => '#', 'is_external' => false, 'nofollow' => false, ], 'condition' => [ 'show_btn' => [ 'yes' ], 'layout_style' => ['1', '2', '3', '5', '6'] ], ] ); $this->add_control( 'phone_label', [ 'label' => __( 'Phone Label', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Phone Number:', 'poolax' ), 'label_block' => true, 'condition' => [ 'layout_style' => ['4'] ], ] ); $this->add_control( 'phone_icon', [ 'label' => __( 'Phone Icon', 'poolax' ), 'type' => Controls_Manager::TEXT, 'label_block' => true, 'default' => '<i class="fa-thin fa-phone"></i>', 'condition' => [ 'layout_style' => ['4'] ], ] ); $this->add_control( 'phone', [ 'label' => __( 'Phone Number', 'poolax' ), 'type' => Controls_Manager::TEXT, 'default' => __( '(+468) 254 762 443', 'poolax' ), 'label_block' => true, 'separator' => 'after', 'condition' => [ 'layout_style' => ['4'] ], ] ); $this->end_controls_section(); //--------------------------------------- //Style Section Start //--------------------------------------- //-------General Style------- $this->start_controls_section( 'general_styling', [ 'label' => __( 'Background Styling', 'poolax' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); poolax_color_fields($this, 'topbar_bg', 'Topbar BG', 'background', '{{WRAPPER}} .header-top'); poolax_color_fields($this, 'topbar_bg2', 'Topbar BG 2', 'background', '{{WRAPPER}} .header-top:before', ['1', '3', '4']); poolax_color_fields($this, 'middle_bg', 'Middle BG', 'background', '{{WRAPPER}} .th-header', ['1']); poolax_color_fields($this, 'menu_bg', 'Menu BG', 'background', '{{WRAPPER}} .main-menu-area', ['1']); poolax_color_fields($this, 'menu_bg3', 'Menu BG', 'background', '{{WRAPPER}} .menu-area', ['3', '4', '5']); poolax_color_fields($this, 'menu_bg2', 'Menu BG 1', 'background', '{{WRAPPER}} .menu-area:before', ['2', '4', '6']); poolax_color_fields($this, 'menu_bg22', 'Menu BG 2', 'background', '{{WRAPPER}} .menu-area:after', ['2', '4', '5']); poolax_color_fields($this, 'logo_bg', 'Logo BG', 'background', '{{WRAPPER}} .logo-shape', ['2']); poolax_color_fields($this, 'logo_bg2', 'Logo BG', 'background', '{{WRAPPER}} .header-logo .logo-bg', ['6']); $this->end_controls_section(); //------Menu Bar Style------- $this->start_controls_section( 'menubar_styling3', [ 'label' => __( 'Menu Styling', 'poolax' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); poolax_color_fields($this, 'menu_color', 'Color', 'color', '{{WRAPPER}} .main-menu>ul>li>a'); poolax_color_fields($this, 'menu_color2', 'Hover Color', 'color', '{{WRAPPER}} .main-menu>ul>li>a:hover'); poolax_color_fields($this, 'menu_color3', 'Dropdown Color', 'color', '{{WRAPPER}} .main-menu ul.sub-menu li a'); poolax_color_fields($this, 'menu_color4', 'Dropdown Hover Color', 'color', '{{WRAPPER}} .main-menu ul.sub-menu li a:hover'); poolax_color_fields($this, 'menu_color5', 'Menu Icon Color', 'color', '{{WRAPPER}} .main-menu ul.sub-menu li a:before'); poolax_typography_fields($this, 'menu_font', 'Menu Trpography', '{{WRAPPER}} .main-menu>ul>li>a, {{WRAPPER}} .main-menu ul.sub-menu li a'); poolax_dimensions_fields($this, 'menu_margin', 'Menu Margin', 'margin', '{{WRAPPER}} .main-menu>ul>li>a'); poolax_dimensions_fields($this, 'menu_padding', 'Menu Padding', 'padding', '{{WRAPPER}} .main-menu>ul>li>a'); $this->end_controls_section(); //------Button Style------- poolax_button_style_fields($this, '12', 'Button Styling', '{{WRAPPER}} .th_btn', ['1', '2', '3', '5', '6']); } public function poolax_menu_select(){ $poolax_menu = wp_get_nav_menus(); $menu_array = array(); $menu_array[''] = __( 'Select A Menu', 'poolax' ); foreach( $poolax_menu as $menu ){ $menu_array[ $menu->slug ] = $menu->name; } return $menu_array; } protected function render() { $settings = $this->get_settings_for_display(); global $woocommerce; //Menu by menu select $poolax_avaiable_menu = $this->poolax_menu_select(); if( ! $poolax_avaiable_menu ){ return; } $args = [ 'menu' => $settings['poolax_menu_select'], 'menu_class' => 'poolax-menu', 'container' => '', ]; //Mobile menu, Offcanvas, Search echo poolax_mobile_menu(); echo poolax_header_cart_offcanvas(); echo poolax_header_offcanvas(); echo poolax_search_box(); // Header sub-menu icon / Header Sticky On/Off if( class_exists( 'ReduxFramework' ) ){ if(poolax_opt('poolax_menu_icon')){ $menu_icon = ''; }else{ $menu_icon = 'hide-icon'; } if(poolax_opt('poolax_header_sticky')){ $sticky = ''; }else{ $sticky = '-no'; } } if( $settings['layout_style'] == '2' ){ $email = $settings['topbar_email'] ? $settings['topbar_email'] : ''; $phone = $settings['topbar_phone'] ? $settings['topbar_phone'] : ''; $email = is_email( $email ); $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout2 header-absolute">'; if(!empty($settings['show_top_bar'])){ echo '<div class="header-top">'; echo '<div class="container th-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['topbar_phone_icon']).'<a href="'.esc_attr('tel:' . $phoneurl).'">'.esc_html($phone).'</a></li>'; } if(!empty($email)){ echo '<li>'.wp_kses_post($settings['topbar_email_icon']).'<a href="'.esc_attr('mailto:' . $emailurl).'">'.esc_html($email).'</a></li>'; } if(!empty($settings['topbar_address'])){ echo '<li>'.wp_kses_post($settings['topbar_address_icon'] . $settings['topbar_address']).'</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; if(!empty( $settings['show_social'])){ echo '<div class="col-auto">'; echo '<div class="social-links">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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 '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; } echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="container th-container">'; echo '<div class="menu-area">'; echo '<div class="row align-items-center justify-content-between">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), )); echo '</a>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto me-lg-auto">'; echo '<nav class="main-menu d-none d-lg-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto">'; echo '<div class="header-button">'; if(!empty( $settings['show_search_btn'])){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if(!empty( $settings['show_offcanvas_btn'])){ echo '<a href="#" class="icon-btn sideMenuToggler d-none d-lg-block"><i class="far fa-bars"></i></a>'; } if(!empty( $settings['show_btn'])){ echo '<a href="'.esc_url($settings['button_url']['url']).'" class="th-btn th_btn border-radius">'.wp_kses_post($settings['button_text']).'</a>'; } echo '<button class="icon-btn th-menu-toggle d-inline-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<div class="logo-shape"></div>'; echo '</div>'; }elseif( $settings['layout_style'] == '3' ){ $phone = $settings['topbar_phone'] ? $settings['topbar_phone'] : ''; $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout5">'; if(!empty($settings['show_top_bar'])){ echo '<div class="header-top">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-center justify-content-md-between align-items-center gy-2">'; if(!empty($settings['topbar_slogan'])){ echo '<div class="col-auto">'; echo '<p class="header-notice">'.wp_kses_post($settings['topbar_slogan']).'</p>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<div class="header-links">'; echo '<ul>'; if(!empty( $settings['show_lang'])){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="langauge lang-dropdown">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'.esc_html__( 'Language', 'poolax' ).'</a>'; echo '<div class="list dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo do_shortcode('[gtranslate]'); echo '</div>'; echo '</div>'; echo '</li>'; } if(!empty( $settings['show_social'])){ echo '<li>'; echo '<div class="header-social">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="menu-area">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-between align-items-center">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_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 d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto ml-20">'; echo '<div class="header-button">'; if(!empty($phone)){ echo '<div class="info-card">'; if(!empty($settings['topbar_phone_icon'])){ echo '<div class="info-card_icon">'; echo wp_kses_post($settings['topbar_phone_icon']); echo '</div>'; } echo '<div class="info-card_content">'; echo '<p class="info-card_text">'.esc_html($settings['topbar_phone_label']).'</p>'; echo '<a href="'.esc_attr('tel:' . $phoneurl).'" class="info-card_link">'.esc_html($phone).'</a>'; echo '</div>'; echo '</div>'; } if(!empty( $settings['show_btn'])){ echo '<a href="'.esc_url($settings['button_url']['url']).'" class="th-btn th_btn">'.wp_kses_post($settings['button_text']).'</a>'; } if(!empty( $settings['show_offcanvas_btn'])){ echo '<a href="#" class="icon-btn sideMenuToggler d-none d-lg-block"><i class="fa-regular fa-bars-staggered"></i></a>'; } echo '<button class="icon-btn th-menu-toggle d-inline-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '4' ){ $email = $settings['topbar_email'] ? $settings['topbar_email'] : ''; $phone = $settings['phone'] ? $settings['phone'] : ''; $email = is_email( $email ); $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout6">'; echo '<div class="header-top">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-center justify-content-xl-between align-items-center gy-2">'; if(!empty($settings['topbar_slogan'])){ echo '<div class="col-auto">'; echo '<p class="header-notice">'.wp_kses_post($settings['topbar_slogan']).'</p>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<div class="header-links style2">'; echo '<ul>'; if(!empty($email)){ echo '<li>'.wp_kses_post($settings['topbar_email_icon']).'<a href="'.esc_attr('mailto:' . $emailurl).'">'.esc_html($email).'</a></li>'; } if(!empty($settings['topbar_address'])){ echo '<li>'.wp_kses_post($settings['topbar_address_icon'] . $settings['topbar_address']).'</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto">'; echo '<div class="header-links">'; echo '<ul>'; if(!empty( $settings['show_lang'])){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="langauge lang-dropdown">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'.esc_html__( 'Language', 'poolax' ).'</a>'; echo '<div class="list dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo do_shortcode('[gtranslate]'); echo '</div>'; echo '</div>'; echo '</li>'; } if(!empty( $settings['show_social'])){ echo '<li>'; echo '<div class="header-social">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="menu-area">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-between align-items-center">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_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 d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto ml-20">'; echo '<div class="header-button">'; if(!empty($phone)){ echo '<div class="info-card">'; echo '<div class="info-card_icon">'.wp_kses_post($settings['phone_icon']).'</div>'; echo '<div class="info-card_content">'; echo '<p class="info-card_text">'.esc_html($settings['phone_label']).'</p>'; echo '<a href="'.esc_attr('tel:' . $phoneurl).'" class="info-card_link">'.esc_html($phone).'</a>'; echo '</div>'; echo '</div>'; } echo '<button class="icon-btn th-menu-toggle d-inline-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '5' ){ $email = $settings['topbar_email'] ? $settings['topbar_email'] : ''; $phone = $settings['topbar_phone'] ? $settings['topbar_phone'] : ''; $email = is_email( $email ); $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout9">'; if(!empty($settings['show_top_bar'])){ echo '<div class="header-top">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-center justify-content-xl-between align-items-center">'; echo '<div class="col-auto d-none d-lg-block">'; echo '<div class="header-links style2">'; echo '<ul>'; if(!empty($phone)){ echo '<li>'.wp_kses_post($settings['topbar_phone_icon']).'<a href="'.esc_attr('tel:' . $phoneurl).'">'.esc_html($phone).'</a></li>'; } if(!empty($email)){ echo '<li>'.wp_kses_post($settings['topbar_email_icon']).'<a href="'.esc_attr('mailto:' . $emailurl).'">'.esc_html($email).'</a></li>'; } if(!empty($settings['topbar_address'])){ echo '<li>'.wp_kses_post($settings['topbar_address_icon'] . $settings['topbar_address']).'</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto">'; echo '<div class="header-links">'; echo '<ul>'; if(!empty( $settings['show_lang'])){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="langauge lang-dropdown">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'.esc_html__( 'Language', 'poolax' ).'</a>'; echo '<div class="list dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo do_shortcode('[gtranslate]'); echo '</div>'; echo '</div>'; echo '</li>'; } if(!empty( $settings['show_social'])){ echo '<li>'; echo '<div class="header-social">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="menu-area">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-between align-items-center">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_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 d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto ml-20">'; echo '<div class="header-button">'; if(!empty( $settings['show_search_btn'])){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if(!empty( $settings['show_btn'])){ echo '<a href="'.esc_url($settings['button_url']['url']).'" class="th-btn th_btn">'.wp_kses_post($settings['button_text']).'</a>'; } if(!empty( $settings['show_offcanvas_btn'])){ echo '<a href="#" class="icon-btn sideMenuToggler d-none d-lg-block"><img src="'.POOLAX_ASSETS.'img/bars.svg" alt="'.esc_attr__('Image', 'poolax').'"></a>'; } echo '<button class="icon-btn th-menu-toggle d-inline-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; }elseif( $settings['layout_style'] == '6' ){ $email = $settings['topbar_email'] ? $settings['topbar_email'] : ''; $phone = $settings['topbar_phone'] ? $settings['topbar_phone'] : ''; $email = is_email( $email ); $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout3 header-absolute">'; if(!empty($settings['show_top_bar'])){ echo '<div class="header-top">'; echo '<div class="container th-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['topbar_phone_icon']).'<a href="'.esc_attr('tel:' . $phoneurl).'">'.esc_html($phone).'</a></li>'; } if(!empty($email)){ echo '<li>'.wp_kses_post($settings['topbar_email_icon']).'<a href="'.esc_attr('mailto:' . $emailurl).'">'.esc_html($email).'</a></li>'; } if(!empty($settings['topbar_address'])){ echo '<li>'.wp_kses_post($settings['topbar_address_icon'] . $settings['topbar_address']).'</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; if(!empty( $settings['show_social'])){ echo '<div class="col-auto">'; echo '<div class="social-links">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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 '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; } echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="menu-area">'; echo '<div class="container th-container">'; echo '<div class="row align-items-center justify-content-between">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), )); echo '</a>'; echo '<div class="logo-bg"></div>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto me-lg-auto">'; echo '<nav class="main-menu d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto">'; echo '<div class="header-button">'; if(!empty( $settings['show_search_btn'])){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if(!empty( $settings['show_offcanvas_btn'])){ echo '<a href="#" class="icon-btn sideMenuToggler d-none d-lg-block"><i class="far fa-bars"></i></a>'; } if(!empty( $settings['show_btn'])){ echo '<a href="'.esc_url($settings['button_url']['url']).'" class="th-btn th_btn style2 radius-none">'.wp_kses_post($settings['button_text']).'</a>'; } echo '<button class="icon-btn th-menu-toggle d-inline-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; }else{ $email = $settings['topbar_email'] ? $settings['topbar_email'] : ''; $phone = $settings['topbar_phone'] ? $settings['topbar_phone'] : ''; $email = is_email( $email ); $replace = array(' ','-',' - '); $replace_phone = array(' ','-',' - ', '(', ')'); $with = array('','',''); $emailurl = str_replace( $replace, $with, $email ); $phoneurl = str_replace( $replace_phone, $with, $phone ); echo '<div class="th-header header-layout1">'; if(!empty($settings['show_top_bar'])){ echo '<div class="header-top">'; echo '<div class="container">'; echo '<div class="row justify-content-center justify-content-md-between align-items-center gy-2">'; if(!empty($settings['topbar_slogan'])){ echo '<div class="col-auto">'; echo '<p class="header-notice">'.wp_kses_post($settings['topbar_slogan']).'</p>'; echo '</div>'; } echo '<div class="col-auto">'; echo '<div class="header-links">'; echo '<ul>'; if(!empty( $settings['show_lang'])){ echo '<li class="d-none d-lg-inline-block">'; echo '<div class="langauge lang-dropdown">'; echo '<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink1" data-bs-toggle="dropdown" aria-expanded="false">'.esc_html__( 'Language', 'poolax' ).'</a>'; echo '<div class="list dropdown-menu" aria-labelledby="dropdownMenuLink1">'; echo do_shortcode('[gtranslate]'); echo '</div>'; echo '</div>'; echo '</li>'; } if(!empty( $settings['show_social'])){ echo '<li>'; echo '<div class="header-social">'; if(!empty($settings['social_text'])){ echo '<span class="social-title">'.esc_html($settings['social_text']).'</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>'; } echo '</ul>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } echo '<!-- Main Menu -->'; echo '<div class="sticky-wrapper'.esc_attr($sticky).'">'; echo '<div class="menu-area">'; echo '<div class="container th-container">'; echo '<div class="row justify-content-between align-items-center">'; echo '<div class="col-auto">'; echo '<div class="header-logo">'; echo '<a href="'.esc_url( home_url( '/' ) ).'">'; echo poolax_img_tag( array( 'url' => esc_url( $settings['logo_image']['url'] ), )); echo '</a>'; echo '</div>'; echo '</div>'; echo '<div class="col-auto ms-auto d-none d-lg-block sticky-d-none">'; echo '<div class="info-card-wrap">'; if(!empty($email)){ echo '<div class="info-card">'; if(!empty($settings['topbar_email_icon'])){ echo '<div class="info-card_icon">'; echo wp_kses_post($settings['topbar_email_icon']); echo '</div>'; } echo '<div class="info-card_content">'; echo '<p class="info-card_text">'.esc_html($settings['topbar_email_label']).'</p>'; echo '<a href="'.esc_attr('mailto:' . $emailurl).'" class="info-card_link">'.esc_html($email).'</a>'; echo '</div>'; echo '</div>'; } if(!empty($phone)){ echo '<div class="info-card">'; if(!empty($settings['topbar_phone_icon'])){ echo '<div class="info-card_icon">'; echo wp_kses_post($settings['topbar_phone_icon']); echo '</div>'; } echo '<div class="info-card_content">'; echo '<p class="info-card_text">'.esc_html($settings['topbar_phone_label']).'</p>'; echo '<a href="'.esc_attr('tel:' . $phoneurl).'" class="info-card_link">'.esc_html($phone).'</a>'; echo '</div>'; echo '</div>'; } echo '</div>'; echo '</div>'; if(!empty( $settings['show_btn'])){ echo '<div class="col-auto ml-20 d-none d-lg-block sticky-d-none">'; echo '<div class="header-button">'; echo '<a href="'.esc_url($settings['button_url']['url']).'" class="th-btn th_btn style3">'.wp_kses_post($settings['button_text']).'</a>'; echo '</div>'; echo '</div>'; } echo '<div class="col-auto sticky-d-block">'; echo '<nav class="main-menu d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto d-lg-none">'; echo '<button class="th-menu-toggle d-block d-lg-none"><i class="far fa-bars"></i></button>'; echo '</div>'; echo '</div>'; echo '<div class="main-menu-area">'; echo '<div class="row justify-content-between align-items-center">'; echo '<div class="col-auto">'; echo '<nav class="main-menu d-none d-lg-inline-block '.esc_attr($menu_icon).'">'; if( ! empty( $settings['poolax_menu_select'] ) ){ wp_nav_menu( $args ); } echo '</nav>'; echo '</div>'; echo '<div class="col-auto d-none d-lg-block">'; echo '<div class="header-button">'; if(!empty( $settings['show_search_btn'])){ echo '<button type="button" class="icon-btn searchBoxToggler"><i class="far fa-search"></i></button>'; } if(!empty( $settings['show_offcanvas_btn'])){ echo '<a href="#" class="icon-btn sideMenuToggler"><i class="far fa-bars"></i></a>'; } echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; echo '</div>'; } } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
header.php
46204 bytes
0644
header2.php
11445 bytes
0644
N4ST4R_ID | Naxtarrr