This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
98 lines (79 loc) · 2.65 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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package Cowork
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<script>
document.documentElement.className += "jsactive";
</script>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'cowork' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<?php
/*
* Pour coworkers connectés, montrer le menu
* Tester si on est connecté:
* NOTE: avec WooCommerce, il y a un nouveau type d'utilisateur, "customer"
*/
if ( is_user_logged_in() ) {
// default for connected users:
echo '<div class="header-member-menu">';
cowork_generate_menu('membres_neuch');
echo '</div>';
} // end testing if logged in
$top_area_content = get_theme_mod( 'cowork_top_area_content' );
if ( '' != $top_area_content ) :
?>
<div class="site-top-content">
<?php echo $top_area_content; ?>
</div><!-- .site-top-content -->
<?php endif; ?>
<div class="site-branding">
<?php edin_the_site_logo(); ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div><!-- .site-branding -->
<?php
// FrontPage Menu
if ( is_front_page() ) {
if ( has_nav_menu( 'cowork_frontpage' ) ) { ?>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Menu', 'cowork' ); ?></button>
<?php
wp_nav_menu( array(
'theme_location' => 'cowork_frontpage',
'container_class' => 'menu-primary',
'menu_class' => 'clear',
) );
?>
</nav><!-- #site-navigation -->
<?php }
} else if ( has_nav_menu( 'primary' ) ) { ?>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Menu', 'cowork' ); ?></button>
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'container_class' => 'menu-primary',
'menu_class' => 'clear',
) );
?>
</nav><!-- #site-navigation -->
<?php
}
?>
</header><!-- #masthead -->
<div id="content" class="site-content">