-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·165 lines (158 loc) · 5.61 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WP_Store
*/
?>
<!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">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class="wp-store-preloader"></div>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'wp-store' ); ?></a>
<?php $logo_alignment = get_theme_mod('wp_store_header_settings_logo_alignment','left');?>
<header id="masthead" class="site-header <?php echo esc_attr($logo_alignment);?>" role="banner">
<div class="top-header">
<div class="ed-container">
<?php
if(get_theme_mod('wp_store_social_setting_section_option_header',0)):?>
<div class="ed-social-icons">
<?php echo do_action('wp_store_social');?>
</div>
<?php
endif;
?>
<?php
if(get_theme_mod('wp_store_header_setting_ticker_option',0)):?>
<div class="ticker">
<?php
echo do_action('wp_store_ticker');
?>
</div>
<?php
endif;
?>
<div class="account-wrap">
<div class="my-account">
<a href="<?php echo esc_url(get_permalink( get_option('woocommerce_myaccount_page_id') )); ?>">
<i class="fa fa-user"></i>
<p><?php _e('My Account','wp-store');?></p>
</a>
</div>
<?php
if (function_exists('YITH_WCWL')) {
$wishlist_url = YITH_WCWL()->get_wishlist_url();
?>
<!-- Wishlist Link -->
<div class="wishlist-box">
<a class="quick-wishlist" href="<?php echo esc_url($wishlist_url); ?>" title="<?php esc_attr_e('Wishlist','wp-store');?>">
<i class="fa fa-heart"></i>
<span class="my-wishlist">
<?php _e('Wishlist','wp-store');
if(yith_wcwl_count_products() > 0) echo ' ['.absint(yith_wcwl_count_products()).']'; ?></span>
</a>
</div>
<?php
}
?>
<div class="user-login">
<?php
//if user is logged in
if(is_user_logged_in()){
global $current_user;
wp_get_current_user();
?>
<a href="<?php echo esc_url(wp_logout_url()); ?>" class="logout">
<i class="fa fa-sign-out "></i>
<?php _e('Logout','wp-store'); ?>
</a>
<?php
} else{
?>
<a href="<?php echo wp_login_url(); ?>" class="login">
<i class="fa fa-sign-in"></i>
<?php _e('Login / Signup','wp-store'); ?>
</a>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="buttom-header">
<div class="ed-container">
<div class="site-branding">
<div class="site-logo">
<?php if ( has_custom_logo() ) :
the_custom_logo();
endif; // End logo check. ?>
</div>
<div class="site-text">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
</a>
</div>
</div><!-- .site-branding -->
<div class="wrap-right">
<div class="header-call-to">
<?php
//call to us
$header_callto = get_theme_mod('wp_store_header_setting_callto_text');
?>
<?php echo $header_callto;?>
</div>
<div class="header-cart">
<?php
//echo es_woocommerce_cart_menu();
if(wp_store_woocommerce_available()):
?>
<a class="cart-content" href="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'wp-store' ); ?>">
<div class="count">
<i class="fa fa-shopping-bag"></i>
<span class="cart-title"><?php _e('Shopping Cart','wp-store');?></span>
<span class="cart-count"><?php echo wp_kses_data(sprintf( _n( '%s Item', '%s Items', WC()->cart->get_cart_contents_count(), 'wp-store' ), WC()->cart->get_cart_contents_count() ) ); ?></span>
<span class="cart-total"><?php echo wp_kses_data( WC()->cart->get_cart_total() ) ; ?></span>
</div>
</a>
<?php the_widget( 'WC_Widget_Cart' ); ?>
<?php
endif;
?>
</div>
</div>
</div>
</div>
<div class="menu-wrap">
<div class="ed-container">
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'wp-store' ); ?></button>
<div class="close"> × </div>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
</nav><!-- #site-navigation -->
<?php if(get_theme_mod('wp_store_header_setting_search_option') =='1'){ ?>
<div class="header-search">
<a href="javascript:void(0)"><i class="fa fa-search"></i></a>
<div class="search-box">
<div class="close"> × </div>
<?php get_template_part('searchform-header'); ?>
</div>
</div> <!-- search-form-->
<?php } ?>
</div>
</div>
</header><!-- #masthead -->
<div id="content" class="site-content">