-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
80 lines (68 loc) · 2.34 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
<?php
/**
* Theme Header
*
* Header data.
*
* @package Agile
* @since 1.0.0
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<!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="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php do_action( 'wp_body_open' ); ?>
<?php do_action( 'ag_body_open' ); ?>
<a class="skip-link" href="#ag-main" aria-label="Skip to main content"><?php esc_html_e( 'Skip to main content', 'agile' ); ?></a>
<a class="skip-link" href="#ag-footer" aria-label="Skip to footer"><?php esc_html_e( 'Skip to footer', 'agile' ); ?></a>
<?php do_action( 'ag_before_header' ); ?>
<header id="ag-site-header" class="ag-site-header">
<div class="ag-container ag-site-header__container">
<div class="ag-site-header__site-logo">
<a class="ag-site-header__site-name" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php
if ( has_custom_logo() ) :
$logo = Arisch\Agile\Extras\Helper_Functions::get_custom_logo();
echo esc_html( printf( '<img src="%s" width="%u" height="%u" alt="%s"', $logo[0], $logo[1], $logo[2], $logo['alt'] ) );
else :
echo esc_html( get_bloginfo( 'name' ) );
endif;
?>
</a>
</div>
<button class="ag-site-header__menu-toggle" data-nav-toggle="false" aria-controls="navigation" aria-expanded="false">
<span class="ag-site-header__hamburger">
<span class="ag-site-header__hamburger-line"></span>
<span class="ag-site-header__hamburger-line"></span>
<span class="ag-site-header__hamburger-line"></span>
</span>
<span class="screen-reader-text"><?php esc_html_e( 'Header Menu', 'agile' ); ?></span>
</button>
<nav id="navigation" class="ag-site-header__nav">
<?php
wp_nav_menu(
array(
'theme_location' => 'header',
'menu_class' => 'ag-site-header__navlist',
'container' => false,
'walker' => new Arisch\Agile\Core\Menu_Walker(),
)
);
?>
</nav>
</div>
</header>
<?php do_action( 'ag_after_header' ); ?>
<main id="ag-main" class="ag-site-main">
<?php
do_action( 'ag_before_main_inner' );