-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathheader.php
92 lines (82 loc) · 2.89 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
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<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 id="ds-container" >
<?php do_action('dt_before_header'); ?>
<?php
$enable_header_top = esc_attr(get_theme_mod('dt_enable_header_top', DT_ENABLE_HEADER_TOP));
if ($enable_header_top == '1') {
$extra_class = 'dt-header-top-enabled';
} else {
$extra_class = '';
}
?>
<header id="site-header" class="site-header <?php echo $extra_class; ?>" role="banner" style="<?php echo dt_header_image(); ?>">
<div class="container">
<?php
/**
* This action is called before the site logo wrapper.
*
* @since 1.0.2
*/
do_action('dt_before_site_logo');?>
<div class="site-logo-wrap">
<?php if ( get_theme_mod( 'logo', false ) ) : ?>
<div class='site-logo'>
<a href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><img src='<?php echo esc_url( get_theme_mod( 'logo', false ) ); ?>' alt='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>'></a>
</div>
<?php else : ?>
<?php
if ( display_header_text() )
$style = ' style="color:#' . get_header_textcolor() . ';"';
else
$style = ' style="display:none;"';
if ( display_header_text() ) : ?>
<?php
$desc = get_bloginfo( 'description', 'display' );
$class = '';
if (!$desc) {
$class = 'site-title-no-desc';
}
?>
<hgroup>
<h1 class='site-title <?php echo $class; ?>'>
<a <?php echo $style; ?> href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>' rel='home'><?php bloginfo( 'name' ); ?></a>
</h1>
<?php
if ($enable_header_top != '1') { ?>
<h2 class="site-description">
<a <?php echo $style; ?> href='<?php echo esc_url( home_url( '/' ) ); ?>' title='<?php echo esc_attr( $desc ); ?>' rel='home'><?php echo $desc; ?></a>
</h2>
<?php } ?>
</hgroup>
<?php endif; ?>
<?php endif; ?>
</div>
<?php if ( has_nav_menu( 'primary-menu' ) ) { ?>
<nav id="primary-nav" class="primary-nav" role="navigation">
<?php
wp_nav_menu( array(
'container' => false,
'theme_location' => 'primary-menu',
) );
?>
</nav>
<?php
/**
* Filter the mobile navigation button html.
*
* @since 1.0.2
*/
echo apply_filters('dt_mobile_menu_button','<div class="dt-nav-toggle dt-mobile-nav-button-wrap"><a href="#primary-nav"><i class="fas fa-bars"></i></a></div>');
} ?>
</div>
</header>
<?php do_action('dt_after_header'); ?>