forked from infinum/eightshift-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
82 lines (74 loc) · 1.56 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
<?php
/**
* Main header file
*
* @package EightshiftBoilerplate
*/
use EightshiftBoilerplateVendor\EightshiftLibs\Helpers\Components;
use EightshiftBoilerplate\Manifest\Manifest;
?>
<!DOCTYPE html>
<html <?php \language_attributes(); ?>>
<head>
<?php
// Head Component.
echo Components::render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'head',
[
'icon' => \apply_filters(Manifest::MANIFEST_ITEM, 'logo.svg'),
]
);
\wp_head();
?>
</head>
<body <?php \body_class(); ?>>
<?php
// Header Component.
echo \wp_kses_post(
Components::render(
'layout-three-columns',
[
'selectorClass' => 'header',
'layoutLeft' => Components::render(
'logo',
[
'parentClass' => 'header',
'logoSrc' => \apply_filters(Manifest::MANIFEST_ITEM, 'logo.svg'),
'logoAlt' => \get_bloginfo('name'),
'logoTitle' => \get_bloginfo('name'),
'logoHref' => \get_bloginfo('url'),
]
),
'layoutCenter' => Components::render(
'menu',
[
'variation' => 'horizontal',
'parentClass' => 'header',
]
),
'layoutRight' => Components::render('hamburger'),
]
)
);
// Menu Drawer Style Component.
echo \wp_kses_post(
Components::render(
'drawer',
[
'drawerTrigger' => 'js-hamburger',
'drawerOverlay' => 'js-page-overlay',
'drawerPosition' => 'left',
'drawerMenu' => Components::render(
'menu',
[
'variation' => 'vertical',
'parentClass' => 'drawer',
]
),
]
)
);
// Page Overlay Component.
echo \wp_kses_post(Components::render('page-overlay'));
?>
<main class="main-content">