<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section
 * 
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package mestore
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
	<?php 
      if(function_exists('wp_body_open')) :
          wp_body_open();
      else :
          do_action('wp_body_open');
      endif;
    ?>
	<?php
    	if(true === get_theme_mod( 'mestore_enable_preloader',true )) :
      		?>
                <!-- Begin Preloader -->
                <div class="loader-wrapper">
                    <?php
                        if(esc_url(get_theme_mod( 'mestore_preloader_image' ))):
                            ?><img src="<?php echo esc_url(get_theme_mod( 'mestore_preloader_image')) ?>" /><?php
                        else:
                            ?>
                                <div class="loader"></div>
                                <?php
                                    if(true === get_theme_mod( 'mestore_enable_preloader_text',false )) :
                                        ?>
                                            <p><?php echo esc_html(empty(get_theme_mod('mestore_preloader_text')) ? esc_html__('loading', 'mestore') : get_theme_mod('mestore_preloader_text')); ?>
                                            </p>
                                        <?php
                                    endif;
                                ?>
                            <?php
                        endif;
                    ?>
                </div>
            	<!-- End Preloader -->
      		<?php
        endif;
	?>
    <!-- Header Styles -->
    <?php
        /**
         * Hook - mestore_action_header.
         *
         * @hooked mestore_header_menu_styles - 10
         */
        do_action( 'mestore_action_header' );
    ?>