Current File : /home/mdkeenpw/www/wp-content/themes/globallogistics/header.php |
<?php
/**
* The Header: Logo and main menu
*
* @package GLOBALLOGISTICS
* @since GLOBALLOGISTICS 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js<?php
// Class scheme_xxx need in the <html> as context for the <body>!
echo ' scheme_' . esc_attr( globallogistics_get_theme_option( 'color_scheme' ) );
?>">
<head>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
} else {
do_action( 'wp_body_open' );
}
do_action( 'globallogistics_action_before_body' );
?>
<div class="<?php echo esc_attr( apply_filters( 'globallogistics_filter_body_wrap_class', 'body_wrap' ) ); ?>" <?php do_action('globallogistics_action_body_wrap_attributes'); ?>>
<?php do_action( 'globallogistics_action_before_page_wrap' ); ?>
<div class="<?php echo esc_attr( apply_filters( 'globallogistics_filter_page_wrap_class', 'page_wrap' ) ); ?>" <?php do_action('globallogistics_action_page_wrap_attributes'); ?>>
<?php do_action( 'globallogistics_action_page_wrap_start' ); ?>
<?php
$globallogistics_full_post_loading = ( globallogistics_is_singular( 'post' ) || globallogistics_is_singular( 'attachment' ) ) && globallogistics_get_value_gp( 'action' ) == 'full_post_loading';
$globallogistics_prev_post_loading = ( globallogistics_is_singular( 'post' ) || globallogistics_is_singular( 'attachment' ) ) && globallogistics_get_value_gp( 'action' ) == 'prev_post_loading';
// Don't display the header elements while actions 'full_post_loading' and 'prev_post_loading'
if ( ! $globallogistics_full_post_loading && ! $globallogistics_prev_post_loading ) {
// Short links to fast access to the content, sidebar and footer from the keyboard
?>
<a class="globallogistics_skip_link skip_to_content_link" href="#content_skip_link_anchor" tabindex="<?php echo esc_attr( apply_filters( 'globallogistics_filter_skip_links_tabindex', 1 ) ); ?>"><?php esc_html_e( "Skip to content", 'globallogistics' ); ?></a>
<?php if ( globallogistics_sidebar_present() ) { ?>
<a class="globallogistics_skip_link skip_to_sidebar_link" href="#sidebar_skip_link_anchor" tabindex="<?php echo esc_attr( apply_filters( 'globallogistics_filter_skip_links_tabindex', 1 ) ); ?>"><?php esc_html_e( "Skip to sidebar", 'globallogistics' ); ?></a>
<?php } ?>
<a class="globallogistics_skip_link skip_to_footer_link" href="#footer_skip_link_anchor" tabindex="<?php echo esc_attr( apply_filters( 'globallogistics_filter_skip_links_tabindex', 1 ) ); ?>"><?php esc_html_e( "Skip to footer", 'globallogistics' ); ?></a>
<?php
do_action( 'globallogistics_action_before_header' );
// Header
$globallogistics_header_type = globallogistics_get_theme_option( 'header_type' );
if ( 'custom' == $globallogistics_header_type && ! globallogistics_is_layouts_available() ) {
$globallogistics_header_type = 'default';
}
get_template_part( apply_filters( 'globallogistics_filter_get_template_part', "templates/header-" . sanitize_file_name( $globallogistics_header_type ) ) );
// Side menu
if ( in_array( globallogistics_get_theme_option( 'menu_side' ), array( 'left', 'right' ) ) ) {
get_template_part( apply_filters( 'globallogistics_filter_get_template_part', 'templates/header-navi-side' ) );
}
// Mobile menu
get_template_part( apply_filters( 'globallogistics_filter_get_template_part', 'templates/header-navi-mobile' ) );
do_action( 'globallogistics_action_after_header' );
}
?>
<?php do_action( 'globallogistics_action_before_page_content_wrap' ); ?>
<div class="page_content_wrap<?php
if ( globallogistics_is_off( globallogistics_get_theme_option( 'remove_margins' ) ) ) {
if ( empty( $globallogistics_header_type ) ) {
$globallogistics_header_type = globallogistics_get_theme_option( 'header_type' );
}
if ( 'custom' == $globallogistics_header_type && globallogistics_is_layouts_available() ) {
$globallogistics_header_id = globallogistics_get_custom_header_id();
if ( $globallogistics_header_id > 0 ) {
$globallogistics_header_meta = globallogistics_get_custom_layout_meta( $globallogistics_header_id );
if ( ! empty( $globallogistics_header_meta['margin'] ) ) {
?> page_content_wrap_custom_header_margin<?php
}
}
}
$globallogistics_footer_type = globallogistics_get_theme_option( 'footer_type' );
if ( 'custom' == $globallogistics_footer_type && globallogistics_is_layouts_available() ) {
$globallogistics_footer_id = globallogistics_get_custom_footer_id();
if ( $globallogistics_footer_id ) {
$globallogistics_footer_meta = globallogistics_get_custom_layout_meta( $globallogistics_footer_id );
if ( ! empty( $globallogistics_footer_meta['margin'] ) ) {
?> page_content_wrap_custom_footer_margin<?php
}
}
}
}
do_action( 'globallogistics_action_page_content_wrap_class', $globallogistics_prev_post_loading );
?>"<?php
if ( apply_filters( 'globallogistics_filter_is_prev_post_loading', $globallogistics_prev_post_loading ) ) {
?> data-single-style="<?php echo esc_attr( globallogistics_get_theme_option( 'single_style' ) ); ?>"<?php
}
do_action( 'globallogistics_action_page_content_wrap_data', $globallogistics_prev_post_loading );
?>>
<?php
do_action( 'globallogistics_action_page_content_wrap', $globallogistics_full_post_loading || $globallogistics_prev_post_loading );
// Single posts banner
if ( apply_filters( 'globallogistics_filter_single_post_header', globallogistics_is_singular( 'post' ) || globallogistics_is_singular( 'attachment' ) ) ) {
if ( $globallogistics_prev_post_loading ) {
if ( globallogistics_get_theme_option( 'posts_navigation_scroll_which_block' ) != 'article' ) {
do_action( 'globallogistics_action_between_posts' );
}
}
// Single post thumbnail and title
$globallogistics_path = apply_filters( 'globallogistics_filter_get_template_part', 'templates/single-styles/' . globallogistics_get_theme_option( 'single_style' ) );
if ( globallogistics_get_file_dir( $globallogistics_path . '.php' ) != '' ) {
get_template_part( $globallogistics_path );
}
}
// Widgets area above page
$globallogistics_body_style = globallogistics_get_theme_option( 'body_style' );
$globallogistics_widgets_name = globallogistics_get_theme_option( 'widgets_above_page' );
$globallogistics_show_widgets = ! globallogistics_is_off( $globallogistics_widgets_name ) && is_active_sidebar( $globallogistics_widgets_name );
if ( $globallogistics_show_widgets ) {
if ( 'fullscreen' != $globallogistics_body_style ) {
?>
<div class="content_wrap">
<?php
}
globallogistics_create_widgets_area( 'widgets_above_page' );
if ( 'fullscreen' != $globallogistics_body_style ) {
?>
</div>
<?php
}
}
// Content area
do_action( 'globallogistics_action_before_content_wrap' );
?>
<div class="content_wrap<?php echo 'fullscreen' == $globallogistics_body_style ? '_fullscreen' : ''; ?>">
<?php do_action( 'globallogistics_action_content_wrap_start' ); ?>
<div class="content">
<?php
do_action( 'globallogistics_action_page_content_start' );
// Skip link anchor to fast access to the content from keyboard
?>
<a id="content_skip_link_anchor" class="globallogistics_skip_link_anchor" href="#"></a>
<?php
// Single posts banner between prev/next posts
if ( ( globallogistics_is_singular( 'post' ) || globallogistics_is_singular( 'attachment' ) )
&& $globallogistics_prev_post_loading
&& globallogistics_get_theme_option( 'posts_navigation_scroll_which_block' ) == 'article'
) {
do_action( 'globallogistics_action_between_posts' );
}
// Widgets area above content
globallogistics_create_widgets_area( 'widgets_above_content' );
do_action( 'globallogistics_action_page_content_start_text' );