-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
94 lines (80 loc) · 3.54 KB
/
Copy pathheader.php
File metadata and controls
94 lines (80 loc) · 3.54 KB
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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress/AskBug
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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(); ?>>
<?php do_action( 'before' ); ?>
<header id="masthead" role="banner">
<nav class="site-nav navbar">
<div class="container-fluid">
<div class="site-nav-flex">
<button id="menu-toggle"><i class="apicon-menu"></i></button>
<!-- Brand and toggle get grouped for better mobile display -->
<div class="site-nav-logo site-nav-flexi">
<a class="logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php if ( has_custom_logo() ) : $logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ) , 'full' ); ?>
<img src="<?php echo esc_url( $logo[0] ); ?>" alt="<?php echo get_bloginfo( 'name' ); ?>" width="<?php echo $logo[1]; ?>" height="<?php echo $logo[2]; ?>">
<?php elseif ( ! empty( get_theme_mod( 'ab_logo' ) ) ) : ?>
<img src="<?php echo get_theme_mod( 'ab_logo' ); ?>" />
<?php else : ?>
<i class="apicon-logo"></i>
<?php endif; ?>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="site-nav-flexi primary-menuc" id="primary-menu">
<?php if ( taxonomy_exists( 'question_category' ) ) : ?>
<div id="category-dropdown" class="btn-group pull-left">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="apicon-category"></i>
</button>
<?php get_template_part( 'parts/category-dropdown' ); ?>
</div><!-- #category-dropdown -->
<?php endif; ?>
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'depth' => 2,
'container' => null,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'menu_id' => 'main-menu',
'walker' => new wp_bootstrap_navwalker()
)
);
?>
<form class="site-nav-search navbar-form site-nav-flexi" role="search" method="get" action="<?php echo ap_link_to('/'); ?>">
<i class="apicon-search" id="search-toggle"></i>
<input type="search" class="form-control" id="main-search" placeholder="<?php echo esc_attr_x( 'Type and hit enter', 'placeholder', 'ab' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="ap_s" title="<?php _ex( 'Search for:', 'label', 'ab' ); ?>">
</form>
</div><!-- /.navbar-collapse -->
<div class="site-nav-ask site-nav-flexi">
<a href="<?php ap_link_to( 'ask' ); ?>" class="btn btn-header-ask">
<?php _e( 'Ask', 'ab' ); ?>
</a>
</div>
<?php if ( is_user_logged_in() ) : ?>
<?php get_template_part( 'parts/top-right-loggedin' ); ?>
<?php else : ?>
<?php get_template_part( 'parts/top-right-nonlogged' ); ?>
<?php endif; ?>
</div>
</div><!-- /.container -->
</nav><!-- /.site-nav -->
</header><!-- /.site-header -->
<div class="main-content">