File: /home/dh_5jabqq/bermudashipwreckarchive.com/wp-content/themes/loquet/includes/header-content.php
<?php
/*======
*
* Header
*
======*/
if( !function_exists( 'loquet_header' ) ) {
function loquet_header( $class = "", $skin = "" ) {
/*====== Header Style 1 ======*/
if( !function_exists( 'loquet_header_style_1' ) ) {
function loquet_header_style_1( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$header_top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
$header_top_bar_width = get_theme_mod( 'loquet_top_bar_width', 'narrow' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $header_top_bar_skin ), $width = esc_attr( $header_top_bar_width ) );
}
$output .= '<div class="gt-header-main gt-style-1 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $header_top_bar_skin ), $width = esc_attr( $header_top_bar_width ) );
}
$output .= '<div class="gt-header-main gt-style-1 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $menu = "true", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 2 ======*/
if( !function_exists( 'loquet_header_style_2' ) ) {
function loquet_header_style_2( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-2 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-2 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $menu = "true", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 3 ======*/
if( !function_exists( 'loquet_header_style_3' ) ) {
function loquet_header_style_3( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-3 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-3 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "true", $menu = "true", $dual_menu = "true", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 4 ======*/
if( !function_exists( 'loquet_header_style_4' ) ) {
function loquet_header_style_4( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-4 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-4 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "true", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 5 ======*/
if( !function_exists( 'loquet_header_style_5' ) ) {
function loquet_header_style_5( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-5 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-5 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "left", $logo = "false", $menu = "true", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $menu = "false", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 1 ======*/
if( !function_exists( 'loquet_header_style_6' ) ) {
function loquet_header_style_6( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_header_skin', 'light' );
$header_width = get_theme_mod( 'loquet_header_width', 'narrow' );
$transparent_header = get_theme_mod( 'loquet_transparent_header', 'false' );
$header_position = get_theme_mod( 'loquet_header_position', 'standard' );
$header_separator = get_theme_mod( 'loquet_header_separator', 'true' );
$header_top_bar = get_theme_mod( 'loquet_header_top_bar' );
$header_top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
$header_top_bar_width = get_theme_mod( 'loquet_top_bar_width', 'narrow' );
/*====== 404 Page Support ======*/
if( is_404() and get_theme_mod( 'loquet_404_page_skin', 'dark' ) == "dark" ) {
$header_skin = "dark";
$transparent_header = "true";
$header_top_bar_skin = "dark";
$header_position = "absolute";
$header_top_bar = "";
}
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_header_width = "";
$page_transparent_header = "";
$page_header_position = "";
$page_header_separator = "";
$page_top_bar = "";
$page_top_bar_skin = "";
$page_top_bar_width = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-header-skin' );
$page_header_width = rwmb_meta( 'loquet-header-width' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-header' );
$page_header_position = rwmb_meta( 'loquet-header-position' );
$page_header_separator = rwmb_meta( 'loquet-transparent-separator' );
$page_top_bar = rwmb_meta( 'loquet-top-bar' );
$page_top_bar_skin = rwmb_meta( 'loquet-top-bar-skin' );
$page_top_bar_width = rwmb_meta( 'loquet-top-bar-width' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_header_width !== "default" and !empty( $page_header_width ) ) {
$header_width = esc_attr( $page_header_width );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( $page_header_separator !== "default" and !empty( $page_header_separator ) ) {
$header_separator = esc_attr( $page_header_separator );
}
if( $page_top_bar !== "default" and !empty( $page_top_bar ) or $page_top_bar == "0" ) {
$header_top_bar = esc_attr( $page_top_bar );
}
if( $page_top_bar_skin !== "default" and !empty( $page_top_bar_skin ) ) {
$header_top_bar_skin = esc_attr( $page_top_bar_skin );
}
if( $page_top_bar_width !== "default" and !empty( $page_top_bar_width ) ) {
$header_top_bar_width = esc_attr( $page_top_bar_width );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-desktop-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $header_top_bar_skin ), $width = esc_attr( $header_top_bar_width ) );
}
$output .= '<div class="gt-header-main gt-style-6 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-desktop-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $header_top_bar_skin ), $width = esc_attr( $header_top_bar_width ) );
}
$output .= '<div class="gt-header-main gt-style-6 gt-' . esc_attr( $header_skin ) . '' . ( $header_separator == 'true' ? ' gt-separator' : '' ) . '">';
}
if( $header_width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_header_elements( $off_canvas = "false", $off_canvas_position = "left", $logo = "true", $menu = "false", $dual_menu = "false", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_header_elements( $off_canvas = "true", $off_canvas_position = "right", $logo = "false", $menu = "true", $dual_menu = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Customizer Settings ======*/
$header = get_theme_mod( 'loquet_header', '1' );
$header_style = get_theme_mod( 'loquet_header_style', 'style-1' );
/*====== Metabox Settings ======*/
if( is_single() or is_page() ) {
if( function_exists( 'rwmb_meta' ) ) {
$page_header = rwmb_meta( 'loquet-header' );
$page_header_style = rwmb_meta( 'loquet-header-style' );
} else {
$page_header = "";
$page_header_style = "";
}
if( $page_header !== "default" and !empty( $page_header ) or $page_header == "0" ) {
$header = esc_attr( $page_header );
}
if( $page_header_style !== "default" and !empty( $page_header_style ) ) {
$header_style = esc_attr( $page_header_style );
}
}
/*====== HTML Output ======*/
if( $header == "1" ) {
if( $header_style == "style-1" ) {
$output = loquet_header_style_1( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-2" ) {
$output = loquet_header_style_2( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-3" ) {
$output = loquet_header_style_3( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-4" ) {
$output = loquet_header_style_4( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-5" ) {
$output = loquet_header_style_5( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-6" ) {
$output = loquet_header_style_6( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
}
return $output;
}
}
}
/*======
*
* Sticky Header
*
======*/
if( !function_exists( 'loquet_sticky_header' ) ) {
function loquet_sticky_header() {
/*====== Customizer Settings ======*/
$sticky_header = get_theme_mod( 'loquet_sticky_header', '1' );
$sticky_header_skin = get_theme_mod( 'loquet_sticky_header_skin', 'light' );
/*====== Metabox Settings ======*/
$page_sticky_header = "";
$page_sticky_header_skin = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_sticky_header = rwmb_meta( 'loquet-sticky-header' );
$page_sticky_header_skin = rwmb_meta( 'loquet-sticky-header-skin' );
}
}
if( $page_sticky_header !== "default" and !empty( $page_sticky_header ) or $page_sticky_header == "0" ) {
$sticky_header = esc_attr( $page_sticky_header );
}
if( $page_sticky_header_skin !== "default" and !empty( $page_sticky_header_skin ) or $page_sticky_header_skin == "0" ) {
$sticky_header_skin = esc_attr( $page_sticky_header_skin );
}
/*====== HTML Output ======*/
$output = "";
if( $sticky_header == "1" ) {
$output = loquet_header( $class = "gt-fixed gt-sticky-header gt-" . esc_attr( $sticky_header_skin ) . "", $skin = esc_attr( $sticky_header_skin ) );
}
return $output;
}
}
/*======
*
* Header Elements
*
======*/
if( !function_exists( 'loquet_header_elements' ) ) {
function loquet_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $menu = "true", $dual_menu = "false", $cart = "true", $user_box = "false", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = "light" ) {
/*====== Function Settings ======*/
if( $off_canvas == "1" ) {
$off_canvas = "true";
}
if( $logo == "1" ) {
$logo = "true";
}
if( $menu == "1" ) {
$menu = "true";
}
if( $cart == "1" ) {
$cart = "true";
}
if( $user_box == "1" ) {
$user_box = "true";
}
if( $search_popup == "1" ) {
$search_popup = "true";
}
if( $language_switcher == "1" ) {
$language_switcher = "true";
}
if( $social_media_links == "1" ) {
$social_media_links = "true";
}
/*====== Customizer Settings ======*/
$header_menu = get_theme_mod( 'loquet_header_menu', '1' );
$header_off_canvas = get_theme_mod( 'loquet_header_off_canvas', '1' );
$header_off_canvas_widgets = get_theme_mod( 'loquet_off_canvas_widgets', '1' );
$header_cart = get_theme_mod( 'loquet_header_cart' );
$header_language_switcher = get_theme_mod( 'loquet_header_language_switcher' );
$header_social_media = get_theme_mod( 'loquet_header_social_media' );
$header_social_media_style = get_theme_mod( 'loquet_header_social_media_style', 'style-1' );
$header_social_media_size = get_theme_mod( 'loquet_header_social_media_size', 'size-m' );
$header_user_box = get_theme_mod( 'loquet_header_user_box' );
$header_user_box_profile = get_theme_mod( 'loquet_header_user_box_profile' );
$header_user_box_logout = get_theme_mod( 'loquet_header_user_box_logout' );
$header_user_box_type = get_theme_mod( 'loquet_header_user_box_type', 'type-1' );
$header_user_box_sign_in_page = get_theme_mod( 'loquet_header_user_box_sign_in_page' );
$header_user_box_sign_up_page = get_theme_mod( 'loquet_header_user_box_sign_up_page' );
$header_user_box_profile_page = get_theme_mod( 'loquet_header_user_box_profile_page' );
$header_search_popup = get_theme_mod( 'loquet_header_search_popup', '1' );
$header_logo = get_theme_mod( 'loquet_header_logo', '1' );
if( empty( $header_user_box_sign_in_page ) ) {
$header_user_box_sign_in_page = wp_login_url( get_the_permalink() );
} else {
$header_user_box_sign_in_page = get_the_permalink( $header_user_box_sign_in_page );
}
if( empty( $header_user_box_sign_up_page ) ) {
$header_user_box_sign_up_page = wp_registration_url();
} else {
$header_user_box_sign_up_page = get_the_permalink( $header_user_box_sign_up_page );
}
if( empty( $header_user_box_profile_page ) ) {
$header_user_box_profile_page = user_admin_url( 'profile.php' );
} else {
$header_user_box_profile_page = get_the_permalink( $header_user_box_profile_page );
}
/*====== HTML Output ======*/
$output = "";
$output .= '<div class="gt-item-group">';
if( $off_canvas == "true" and $header_off_canvas == "1" and $off_canvas_position == "left" ) {
if( has_nav_menu( 'off-canvas-menu' ) or $header_off_canvas_widgets == "1" and is_active_sidebar( 'loquet-off-canvas-sidebar' ) ) {
$output .= '<div class="gt-item gt-off-canvas-icon">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>';
$output .= '</div>';
}
}
if( $logo == "true" and $header_logo == "1" and $dual_menu == "false" ) {
if( $header_skin == "light" ) {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_header_light_skin_logo();
$output .= '</a>';
$output .= '</div>';
} else {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_header_dark_skin_logo();
$output .= '</a>';
$output .= '</div>';
}
}
if( $menu == "true" and $header_menu == "1" and $dual_menu == "false" ) {
$output .= wp_nav_menu(
array(
'theme_location' => 'main-menu',
'container' => 'div',
'container_class' => 'gt-item gt-menu',
'menu_class' => 'gt-nav-menu',
'fallback_cb' => 'loquet_walker::fallback',
'walker' => new loquet_walker(),
'depth' => '4',
'echo' => false,
)
);
}
if( $menu == "true" and $header_menu == "1" and $dual_menu == "true" ) {
$output .= wp_nav_menu(
array(
'theme_location' => 'main-menu-left',
'container' => 'div',
'container_class' => 'gt-item gt-menu gt-menu-left',
'menu_class' => 'gt-nav-menu',
'fallback_cb' => 'loquet_walker::fallback',
'walker' => new loquet_walker(),
'depth' => '4',
'echo' => false,
)
);
}
if( $logo == "true" and $header_logo == "1" and $dual_menu == "true" ) {
if( $header_skin == "light" ) {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_header_light_skin_logo();
$output .= '</a>';
$output .= '</div>';
} else {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_header_dark_skin_logo();
$output .= '</a>';
$output .= '</div>';
}
}
if( $menu == "true" and $header_menu == "1" and $dual_menu == "true" ) {
$output .= wp_nav_menu(
array(
'theme_location' => 'main-menu-right',
'container' => 'div',
'container_class' => 'gt-item gt-menu gt-menu-right',
'menu_class' => 'gt-nav-menu',
'fallback_cb' => 'loquet_walker::fallback',
'walker' => new loquet_walker(),
'depth' => '4',
'echo' => false,
)
);
}
if( $cart == "true" and $header_cart == "1" ) {
if( class_exists( 'woocommerce' ) ) {
$output .= '<div class="gt-item gt-cart">';
$output .= '<a href="' . esc_url( wc_get_cart_url() ) . '">';
$cart_count = WC()->cart->get_cart_contents_count();
$output .= '<div class="gt-cart-count">';
if( $cart_count !== 0 ) {
$output .= esc_attr( WC()->cart->get_cart_contents_count() );
}
$output .= '</div>';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-shopping-cart"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>';
$output .= '</a>';
$output .= '</div>';
}
}
if( $user_box == "true" and $header_user_box == "1" ) {
if( !is_user_logged_in() ) {
if( $header_user_box_type == "type-1" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-2" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
$output .= '<div class="gt-item gt-linked-item">';
$output .= '<a href="' . esc_url( $header_user_box_sign_up_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-4" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_up_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign Up', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-5" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</div>';
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-7" ) {
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</div>';
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign Up', 'loquet' );
$output .= '</span>';
$output .= '</div>';
}
} else {
if( $header_user_box_profile == "1" ) {
$current_user = wp_get_current_user();
if( $header_user_box_type == "type-1" or $header_user_box_type == "type-2" or $header_user_box_type == "type-5" or $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-user-box gt-linked-item">';
$output .= '<a href="' . esc_url( $header_user_box_profile_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" or $header_user_box_type == "type-4" or $header_user_box_type == "type-7" or $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_profile_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Profile', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
}
}
if( $header_user_box_logout == "1" ) {
if( $header_user_box_type == "type-1" or $header_user_box_type == "type-2" or $header_user_box_type == "type-5" or $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( wp_logout_url() ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" or $header_user_box_type == "type-4" or $header_user_box_type == "type-7" or $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( wp_logout_url() ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Logout', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
}
}
}
}
if( $search_popup == "true" and $header_search_popup == "1" ) {
$output .= '<div class="gt-item gt-search">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>';
$output .= '</div>';
}
if( $language_switcher == "true" and $header_language_switcher == "1" ) {
$output .= '<div class="gt-item gt-language">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="currentColor" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"> <g> <g> <path d="M255,0C112.87,0,0,117.257,0,257c0,140.939,114.049,255,255,255c139.899,0,257-113.031,257-255 C512,116.695,396.441,0,255,0z M167.142,48.027C125.596,99.438,107.473,175.418,105.259,242H30.504 C36.175,154.729,90.938,80.761,167.142,48.027z M30.512,272h74.748c2.219,66.423,20.265,141.202,61.248,191.854 C90.675,431.289,36.215,358.205,30.512,272z M240,480.171c-24.922-6.06-48.428-27.117-67.386-60.819 c-22.275-39.6-35.35-91.461-37.339-147.352H240V480.171z M240,242H135.282C139.179,135.078,184.309,45.675,240,31.854V242z M481.492,242h-74.758c-2.735-79.954-27.18-150.22-63.5-194.149C420.327,80.497,475.76,154.575,481.492,242z M270,31.918 C325.539,45.954,372.756,133.689,376.717,242H270V31.918z M270,480.194V271.8h106.716C372.81,378.102,326.305,466.685,270,480.194 z M344.095,463.934c41.954-51.07,60.365-126.142,62.637-192.134h74.751C475.725,358.073,420.698,431.407,344.095,463.934z"></path> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>';
$output .= '</div>';
}
if( $social_media_links == "true" and function_exists( 'loquet_social_media_links' ) and $header_social_media == "1" ) {
if( !empty( loquet_social_media_links() ) ) {
$output .= '<div class="gt-item gt-social">';
$output .= loquet_social_media_links( $class = "", $style = esc_attr( $header_social_media_style ), $skin = esc_attr( $header_skin ), $size = esc_attr( $header_social_media_size ) );
$output .= '</div>';
}
}
if( $off_canvas == "true" and $header_off_canvas == "1" and $off_canvas_position == "right" ) {
if( has_nav_menu( 'off-canvas-menu' ) or $header_off_canvas_widgets == "1" and is_active_sidebar( 'loquet-off-canvas-sidebar' ) ) {
$output .= '<div class="gt-item gt-off-canvas-icon">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>';
$output .= '</div>';
}
}
$output .= '</div>';
return $output;
}
}
/*======
*
* Header Top Bar
*
======*/
if( !function_exists( 'loquet_header_top_bar' ) ) {
function loquet_header_top_bar( $menu = "true", $description = "true", $skin = "", $width = "" ) {
/*====== Function Settings ======*/
if( $menu == "1" ) {
$menu = "true";
}
if( $description == "1" ) {
$description = "true";
}
/*====== Customizer Settings ======*/
$top_bar_menu = get_theme_mod( 'loquet_top_bar_menu' );
$top_bar_description = get_theme_mod( 'loquet_top_bar_description' );
$top_bar_description_text = get_theme_mod( 'loquet_top_bar_description_text' );
/*====== HTML Output ======*/
$output = "";
if( $menu == "true" or $description == "true" ) {
if( $top_bar_menu == "1" or $top_bar_description == "1" ) {
$output .= '<div class="gt-header-topbar gt-style-1 gt-' . esc_attr( $skin ) . '">';
if( $width == "wide" ) {
$output .= '<div class="gt-flex-container-full">';
} else {
$output .= '<div class="gt-flex-container">';
}
if( $description == "true" and $top_bar_description == "1" ) {
$output .= '<div class="gt-item-group">';
$output .= '<div class="gt-item gt-description-text">';
$output .= do_shortcode( loquet_sanitize_html( $top_bar_description_text ) );
$output .= '</div>';
$output .= '</div>';
}
if( $menu == "true" and $top_bar_menu == "1") {
$output .= '<div class="gt-item-group">';
$output .= wp_nav_menu(
array(
'theme_location' => 'top-bar-menu',
'container' => 'div',
'container_class' => 'gt-item gt-topbar-menu',
'fallback_cb' => 'loquet_walker::fallback',
'menu_class' => 'gt-top-bar-nav-menu',
'walker' => new loquet_walker(),
'depth' => '2',
'echo' => false,
)
);
$output .= '</div>';
}
$output .= '</div>';
$output .= '</div>';
}
}
return $output;
}
}
/*======
*
* Header Light Skin Logo
*
======*/
if( !function_exists( 'loquet_header_light_skin_logo' ) ) {
function loquet_header_light_skin_logo() {
/*====== Customizer Settings ======*/
$logo = get_theme_mod( 'loquet_header_light_skin_logo' );
$size = get_theme_mod( 'loquet_header_logo_sizes', array( 'width' => '71', 'height' => '21' ) );
/*====== HTML Output ======*/
$output = "";
if( !empty( $logo ) ) {
$output .= wp_get_attachment_image( esc_attr( $logo ), array( esc_attr( $size["width"] ), esc_attr( $size["height"] ) ), '' );
} else {
$output .= '<span>' . esc_attr( get_bloginfo( 'name' ) ) . '</span>';
}
return $output;
}
}
/*======
*
* Header Dark Skin Logo
*
======*/
if( !function_exists( 'loquet_header_dark_skin_logo' ) ) {
function loquet_header_dark_skin_logo() {
/*====== Customizer Settings ======*/
$logo = get_theme_mod( 'loquet_header_dark_skin_logo' );
$size = get_theme_mod( 'loquet_header_logo_sizes', array( 'width' => '71', 'height' => '21' ) );
/*====== HTML Output ======*/
$output = "";
if( !empty( $logo ) ) {
$output .= wp_get_attachment_image( esc_attr( $logo ), array( esc_attr( $size["width"] ), esc_attr( $size["height"] ) ), '' );
} else {
$output .= '<span>' . esc_attr( get_bloginfo( 'name' ) ) . '</span>';
}
return $output;
}
}
/*======
*
* Mobile Header
*
======*/
if( !function_exists( 'loquet_mobile_header' ) ) {
function loquet_mobile_header( $class = "", $skin = "" ) {
/*====== Header Style 1 ======*/
if( !function_exists( 'loquet_mobile_header_style_1' ) ) {
function loquet_mobile_header_style_1( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_mobile_header_skin', 'light' );
$transparent_header = get_theme_mod( 'loquet_transparent_mobile_header', 'false' );
$header_position = get_theme_mod( 'loquet_mobile_header_position', 'default' );
$header_top_bar = get_theme_mod( 'loquet_mobile_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_transparent_header = "";
$page_header_position = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-mobile-header-skin' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-mobile-header' );
$page_header_position = rwmb_meta( 'loquet-mobile-header-position' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-mobile-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-1 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-mobile-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-1 gt-' . esc_attr( $header_skin ) . '">';
}
$output .= '<div class="gt-flex-container-full">';
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_mobile_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_mobile_header_elements( $off_canvas = "false", $off_canvas_position = "left", $logo = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 2 ======*/
if( !function_exists( 'loquet_mobile_header_style_2' ) ) {
function loquet_mobile_header_style_2( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_mobile_header_skin', 'light' );
$transparent_header = get_theme_mod( 'loquet_transparent_mobile_header', 'false' );
$header_position = get_theme_mod( 'loquet_mobile_header_position', 'default' );
$header_top_bar = get_theme_mod( 'loquet_mobile_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_transparent_header = "";
$page_header_position = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-mobile-header-skin' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-mobile-header' );
$page_header_position = rwmb_meta( 'loquet-mobile-header-position' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-mobile-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-2 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-mobile-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-2 gt-' . esc_attr( $header_skin ) . '">';
}
$output .= '<div class="gt-flex-container-full">';
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_mobile_header_elements( $off_canvas = "false", $off_canvas_position = "left", $logo = "true", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_mobile_header_elements( $off_canvas = "true", $off_canvas_position = "right", $logo = "false", $cart = "true", $user_box = "true", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Header Style 3 ======*/
if( !function_exists( 'loquet_mobile_header_style_3' ) ) {
function loquet_mobile_header_style_3( $class = "", $skin = "" ) {
/*====== Customizer Settings ======*/
$header_skin = get_theme_mod( 'loquet_mobile_header_skin', 'light' );
$transparent_header = get_theme_mod( 'loquet_transparent_mobile_header', 'false' );
$header_position = get_theme_mod( 'loquet_mobile_header_position', 'default' );
$header_top_bar = get_theme_mod( 'loquet_mobile_header_top_bar' );
$top_bar_skin = get_theme_mod( 'loquet_top_bar_skin', 'dark' );
/*====== Metabox Settings ======*/
$page_header_skin = "";
$page_transparent_header = "";
$page_header_position = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_header_skin = rwmb_meta( 'loquet-mobile-header-skin' );
$page_transparent_header = rwmb_meta( 'loquet-transparent-mobile-header' );
$page_header_position = rwmb_meta( 'loquet-mobile-header-position' );
}
}
if( $page_header_skin !== "default" and !empty( $page_header_skin ) ) {
$header_skin = esc_attr( $page_header_skin );
}
if( $page_transparent_header !== "default" and !empty( $page_transparent_header ) ) {
$transparent_header = esc_attr( $page_transparent_header );
}
if( $page_header_position !== "default" and !empty( $page_header_position ) ) {
$header_position = esc_attr( $page_header_position );
}
if( !empty( $skin ) ) {
$header_skin = esc_attr( $skin );
}
/*====== HTML Output ======*/
$output = "";
if( !empty( $class ) ) {
$output .= '<header class="gt-header gt-mobile-header ' . esc_attr( $class ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-3 gt-' . esc_attr( $header_skin ) . '">';
} else {
$output .= '<header class="gt-header gt-mobile-header gt-' . esc_attr( $header_position ) . '' . ( $transparent_header == 'true' ? ' gt-transparent' : '' ) . '">';
if( $header_top_bar == "1" ) {
$output .= loquet_header_top_bar( $menu = "true", $description = "true", $skin = esc_attr( $top_bar_skin ) );
}
$output .= '<div class="gt-header-main gt-style-3 gt-' . esc_attr( $header_skin ) . '">';
}
$output .= '<div class="gt-flex-container-full">';
$output .= '<div class="gt-header-main-inner">';
$output .= loquet_mobile_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "false", $cart = "false", $user_box = "false", $search_popup = "true", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_mobile_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "true", $cart = "false", $user_box = "false", $search_popup = "false", $language_switcher = "false", $social_media_links = "false", $header_skin = esc_attr( $header_skin ) );
$output .= loquet_mobile_header_elements( $off_canvas = "false", $off_canvas_position = "right", $logo = "false", $cart = "true", $user_box = "true", $search_popup = "false", $language_switcher = "true", $social_media_links = "true", $header_skin = esc_attr( $header_skin ) );
$output .= '</div>';
$output .= '</div>';
$output .= '</header>';
return $output;
}
}
/*====== Customizer Settings ======*/
$header = get_theme_mod( 'loquet_mobile_header', '1' );
$header_style = get_theme_mod( 'loquet_mobile_header_style', 'style-1' );
/*====== Metabox Settings ======*/
if( is_single() or is_page() ) {
if( function_exists( 'rwmb_meta' ) ) {
$page_header = rwmb_meta( 'loquet-mobile-header' );
$page_header_style = rwmb_meta( 'loquet-mobile-header-style' );
} else {
$page_header = "";
$page_header_style = "";
}
if( $page_header !== "default" and !empty( $page_header ) or $page_header == "0" ) {
$header = esc_attr( $page_header );
}
if( $page_header_style !== "default" and !empty( $page_header_style ) ) {
$header_style = esc_attr( $page_header_style );
}
}
/*====== HTML Output ======*/
if( $header == "1" ) {
if( $header_style == "style-1" ) {
$output = loquet_mobile_header_style_1( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-2" ) {
$output = loquet_mobile_header_style_2( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-3" ) {
$output = loquet_mobile_header_style_3( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
} elseif( $header_style == "style-4" ) {
$output = loquet_mobile_header_style_4( $class = esc_attr( $class ), $skin = esc_attr( $skin ) );
}
return $output;
}
}
}
/*======
*
* Sticky Mobile Header
*
======*/
if( !function_exists( 'loquet_sticky_mobile_header' ) ) {
function loquet_sticky_mobile_header() {
/*====== Customizer Settings ======*/
$sticky_mobile_header = get_theme_mod( 'loquet_sticky_mobile_header', '1' );
$sticky_mobile_header_skin = get_theme_mod( 'loquet_sticky_mobile_header_skin', 'light' );
/*====== Metabox Settings ======*/
$page_sticky_header = "";
$page_sticky_header_skin = "";
if( function_exists( 'rwmb_meta' ) ) {
if( is_single() or is_page() ) {
$page_sticky_header = rwmb_meta( 'loquet-sticky-mobile-header' );
$page_sticky_header_skin = rwmb_meta( 'loquet-sticky-mobile-header-skin' );
}
}
if( $page_sticky_header !== "default" and !empty( $page_sticky_header ) or $page_sticky_header == "0" ) {
$sticky_mobile_header = esc_attr( $page_sticky_header );
}
if( $page_sticky_header_skin !== "default" and !empty( $page_sticky_header_skin ) or $page_sticky_header_skin == "0" ) {
$sticky_mobile_header_skin = esc_attr( $page_sticky_header_skin );
}
/*====== HTML Output ======*/
$output = "";
if( $sticky_mobile_header == "1" ) {
$output = loquet_mobile_header( $class = "gt-fixed gt-sticky-header gt-sticky-mobile-header", $skin = esc_attr( $sticky_mobile_header_skin ) );
}
return $output;
}
}
/*======
*
* Mobile Header Elements
*
======*/
if( !function_exists( 'loquet_mobile_header_elements' ) ) {
function loquet_mobile_header_elements( $off_canvas = "true", $off_canvas_position = "left", $logo = "true", $cart = "true", $user_box = "false", $search_popup = "true", $language_switcher = "true", $social_media_links = "true", $header_skin = "light" ) {
/*====== Function Settings ======*/
if( $off_canvas == "1" ) {
$off_canvas = "true";
}
if( $logo == "1" ) {
$logo = "true";
}
if( $cart == "1" ) {
$cart = "true";
}
if( $user_box == "1" ) {
$user_box = "true";
}
if( $search_popup == "1" ) {
$search_popup = "true";
}
if( $language_switcher == "1" ) {
$language_switcher = "true";
}
if( $social_media_links == "1" ) {
$social_media_links = "true";
}
/*====== Customizer Settings ======*/
$header_off_canvas = get_theme_mod( 'loquet_mobile_header_off_canvas', '1' );
$header_off_canvas_widgets = get_theme_mod( 'loquet_off_canvas_widgets', '1' );
$header_cart = get_theme_mod( 'loquet_mobile_header_cart' );
$header_language_switcher = get_theme_mod( 'loquet_mobile_header_language_switcher' );
$header_social_media = get_theme_mod( 'loquet_mobile_header_social_media' );
$header_social_media_style = get_theme_mod( 'loquet_mobile_header_social_media_style', 'style-1' );
$header_social_media_size = get_theme_mod( 'loquet_mobile_header_social_media_size', 'size-m' );
$header_user_box = get_theme_mod( 'loquet_mobile_header_user_box' );
$header_user_box_profile = get_theme_mod( 'loquet_mobile_header_user_box_profile' );
$header_user_box_logout = get_theme_mod( 'loquet_mobile_header_user_box_logout' );
$header_user_box_type = get_theme_mod( 'loquet_header_user_box_type', 'type-1' );
$header_user_box_sign_in_page = get_theme_mod( 'loquet_header_user_box_sign_in_page' );
$header_user_box_sign_up_page = get_theme_mod( 'loquet_header_user_box_sign_up_page' );
$header_user_box_profile_page = get_theme_mod( 'loquet_header_user_box_profile_page' );
$header_search_popup = get_theme_mod( 'loquet_mobile_header_search_popup', '1' );
$header_logo = get_theme_mod( 'loquet_mobile_header_logo', '1' );
if( empty( $header_user_box_sign_in_page ) ) {
$header_user_box_sign_in_page = wp_login_url( get_the_permalink() );
} else {
$header_user_box_sign_in_page = get_the_permalink( $header_user_box_sign_in_page );
}
if( empty( $header_user_box_sign_up_page ) ) {
$header_user_box_sign_up_page = wp_registration_url();
} else {
$header_user_box_sign_up_page = get_the_permalink( $header_user_box_sign_up_page );
}
if( empty( $header_user_box_profile_page ) ) {
$header_user_box_profile_page = user_admin_url( 'profile.php' );
} else {
$header_user_box_profile_page = get_the_permalink( $header_user_box_profile_page );
}
/*====== HTML Output ======*/
$output = "";
$output .= '<div class="gt-item-group">';
if( $off_canvas == "true" and $header_off_canvas == "1" and $off_canvas_position == "left" ) {
if( has_nav_menu( 'off-canvas-menu' ) or $header_off_canvas_widgets == "1" and is_active_sidebar( 'loquet-off-canvas-sidebar' ) ) {
$output .= '<div class="gt-item gt-off-canvas-icon">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>';
$output .= '</div>';
}
}
if( $logo == "true" and $header_logo == "1" ) {
if( $header_skin == "light" ) {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_mobile_header_light_skin_logo();
$output .= '</a>';
$output .= '</div>';
} else {
$output .= '<div class="gt-item gt-logo">';
$output .= '<a href="' . esc_url( home_url( '/' ) ) . '">';
$output .= loquet_mobile_header_dark_skin_logo();
$output .= '</a>';
$output .= '</div>';
}
}
if( $cart == "true" and $header_cart == "1" ) {
if( class_exists( 'woocommerce' ) ) {
$output .= '<div class="gt-item gt-cart">';
$output .= '<a href="' . esc_url( wc_get_cart_url() ) . '">';
$cart_count = WC()->cart->get_cart_contents_count();
$output .= '<div class="gt-cart-count">';
if( $cart_count !== 0 ) {
$output .= esc_attr( WC()->cart->get_cart_contents_count() );
}
$output .= '</div>';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-shopping-cart"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>';
$output .= '</a>';
$output .= '</div>';
}
}
if( $user_box == "true" and $header_user_box == "1" ) {
if( !is_user_logged_in() ) {
if( $header_user_box_type == "type-1" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-2" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
$output .= '<div class="gt-item gt-linked-item">';
$output .= '<a href="' . esc_url( $header_user_box_sign_up_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-4" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_in_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_sign_up_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Sign Up', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-5" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</div>';
$output .= '<div class="gt-item gt-linked-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line></svg>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-7" ) {
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign In', 'loquet' );
$output .= '</span>';
$output .= '</div>';
$output .= '<div class="gt-item gt-user-box" data-fancybox data-loop="false" data-animation-duration="700" data-src="#user-box-popup">';
$output .= '<span>';
$output .= esc_html__( 'Sign Up', 'loquet' );
$output .= '</span>';
$output .= '</div>';
}
} else {
if( $header_user_box_profile == "1" ) {
$current_user = wp_get_current_user();
if( $header_user_box_type == "type-1" or $header_user_box_type == "type-2" or $header_user_box_type == "type-5" or $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-user-box gt-linked-item">';
$output .= '<a href="' . esc_url( $header_user_box_profile_page ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" or $header_user_box_type == "type-4" or $header_user_box_type == "type-7" or $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( $header_user_box_profile_page ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Profile', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
}
}
if( $header_user_box_logout == "1" ) {
if( $header_user_box_type == "type-1" or $header_user_box_type == "type-2" or $header_user_box_type == "type-5" or $header_user_box_type == "type-6" ) {
$output .= '<div class="gt-item gt-linked-item gt-user-box">';
$output .= '<a href="' . esc_url( wp_logout_url() ) . '">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>';
$output .= '</a>';
$output .= '</div>';
} elseif( $header_user_box_type == "type-3" or $header_user_box_type == "type-4" or $header_user_box_type == "type-7" or $header_user_box_type == "type-8" ) {
$output .= '<div class="gt-item gt-user-box">';
$output .= '<a href="' . esc_url( wp_logout_url() ) . '">';
$output .= '<span>';
$output .= esc_html__( 'Logout', 'loquet' );
$output .= '</span>';
$output .= '</a>';
$output .= '</div>';
}
}
}
}
if( $search_popup == "true" and $header_search_popup == "1" ) {
$output .= '<div class="gt-item gt-search">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>';
$output .= '</div>';
}
if( $language_switcher == "true" and $header_language_switcher == "1" ) {
$output .= '<div class="gt-item gt-language">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" fill="currentColor" viewBox="0 0 512 512" xml:space="preserve"> <g> <g> <path d="M255,0C112.87,0,0,117.257,0,257c0,140.939,114.049,255,255,255c139.899,0,257-113.031,257-255 C512,116.695,396.441,0,255,0z M167.142,48.027C125.596,99.438,107.473,175.418,105.259,242H30.504 C36.175,154.729,90.938,80.761,167.142,48.027z M30.512,272h74.748c2.219,66.423,20.265,141.202,61.248,191.854 C90.675,431.289,36.215,358.205,30.512,272z M240,480.171c-24.922-6.06-48.428-27.117-67.386-60.819 c-22.275-39.6-35.35-91.461-37.339-147.352H240V480.171z M240,242H135.282C139.179,135.078,184.309,45.675,240,31.854V242z M481.492,242h-74.758c-2.735-79.954-27.18-150.22-63.5-194.149C420.327,80.497,475.76,154.575,481.492,242z M270,31.918 C325.539,45.954,372.756,133.689,376.717,242H270V31.918z M270,480.194V271.8h106.716C372.81,378.102,326.305,466.685,270,480.194 z M344.095,463.934c41.954-51.07,60.365-126.142,62.637-192.134h74.751C475.725,358.073,420.698,431.407,344.095,463.934z"></path> </g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> <g> </g> </svg>';
$output .= '</div>';
}
if( $social_media_links == "true" and function_exists( 'loquet_social_media_links' ) and $header_social_media == "1" ) {
if( !empty( loquet_social_media_links() ) ) {
$output .= '<div class="gt-item gt-social">';
$output .= loquet_social_media_links( $class = "", $style = esc_attr( $header_social_media_style ), $skin = esc_attr( $header_skin ), $size = esc_attr( $header_social_media_size ) );
$output .= '</div>';
}
}
if( $off_canvas == "true" and $header_off_canvas == "1" and $off_canvas_position == "right" ) {
if( has_nav_menu( 'off-canvas-menu' ) or $header_off_canvas_widgets == "1" and is_active_sidebar( 'loquet-off-canvas-sidebar' ) ) {
$output .= '<div class="gt-item gt-off-canvas-icon">';
$output .= '<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>';
$output .= '</div>';
}
}
$output .= '</div>';
return $output;
}
}
/*======
*
* Mobile Header Light Skin Logo
*
======*/
if( !function_exists( 'loquet_mobile_header_light_skin_logo' ) ) {
function loquet_mobile_header_light_skin_logo() {
/*====== Customizer Settings ======*/
$logo = get_theme_mod( 'loquet_mobile_header_light_skin_logo' );
$size = get_theme_mod( 'loquet_mobile_header_logo_sizes', array( 'width' => '71', 'height' => '21' ) );
/*====== HTML Output ======*/
$output = "";
if( !empty( $logo ) ) {
$output .= wp_get_attachment_image( esc_attr( $logo ), array( esc_attr( $size["width"] ), esc_attr( $size["height"] ) ), '' );
} else {
$output .= '<span>' . esc_attr( get_bloginfo( 'name' ) ) . '</span>';
}
return $output;
}
}
/*======
*
* Mobile Header Dark Skin Logo
*
======*/
if( !function_exists( 'loquet_mobile_header_dark_skin_logo' ) ) {
function loquet_mobile_header_dark_skin_logo() {
/*====== Customizer Settings ======*/
$logo = get_theme_mod( 'loquet_mobile_header_dark_skin_logo' );
$size = get_theme_mod( 'loquet_mobile_header_logo_sizes', array( 'width' => '71', 'height' => '21' ) );
/*====== HTML Output ======*/
$output = "";
if( !empty( $logo ) ) {
$output .= wp_get_attachment_image( esc_attr( $logo ), array( esc_attr( $size["width"] ), esc_attr( $size["height"] ) ), '' );
} else {
$output .= '<span>' . esc_attr( get_bloginfo( 'name' ) ) . '</span>';
}
return $output;
}
}