-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheader.php
113 lines (100 loc) · 5.41 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
global $detect_mobile;
global $opt_responsive;
// For mobile, set a cookie so that pages from mobile browsers will not be cached
if ( $detect_mobile && of_get_option('opt_responsive') && !isset($_COOKIE["UFLmobileFull"])) {
setcookie("UFLmobileMobile", "enabled", time()+2592000, "/");
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<?php
ufclas_responsive_head_top(); // Custom hook to include content after the head tag
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<?php ufclas_responsive_body_top(); // Custom hook to include content after the body tag ?>
<div id="full-modal"></div>
<ul class="screen-reader-text">
<li><a href="http://assistive.usablenet.com/tt/<?php if ( empty($post->ID) ) { echo esc_url(home_url()); } else { echo esc_url(get_permalink( $post->ID )); } ?>" accesskey="t" title="Text-only version of this website">Text-only version of this website</a></li>
<li><a href="#content" accesskey="s" title="Skip navigation">Skip navigation</a></li>
<li><a href="<?php bloginfo( 'url' ); ?>" accesskey="1" title="Home page">Home page</a></li>
<li><a href="<?php bloginfo( 'url' ); ?>/#secondary" accesskey="2" title="what's new">What's new</a></li>
<li><a href="#search" accesskey="4" title="Search">Search</a></li>
<?php $webmaster_email = of_get_option("opt_webmaster_email"); if( !empty($webmaster_email) && ufl_check_email_address($webmaster_email) ) { echo "<li><a id=\"contact-webmaster-srt\" accesskey=\"6\" href=\"mailto:".$webmaster_email."\">Contact Webmaster</a></li> "; } else { echo "<li><a id=\"contact-webmaster-srt\" accesskey=\"6\" href=\"".$webmaster_email."\">Contact Webmaster</a></li> "; } ?>
<li><a href="#footer-links" accesskey="8" title="Website policies">Website policies</a></li>
<li><a href="http://www.ufl.edu/disability/" accesskey="0" title="Disability services">Disability services</a></li>
</ul>
<?php
$disabled_global_elements = of_get_option('opt_disable_global_elements');
if (!$disabled_global_elements):
if ($opt_responsive && $detect_mobile) {
if (isset($_COOKIE["UFLmobileFull"])){
include('library/php/uf-institutional-nav.php');
}
}else{
include('library/php/uf-institutional-nav.php');
}
endif;
?>
<header role="banner">
<div class="container">
<!-- begin website title logic -->
<?php ufandshands_site_title(); ?>
<!-- end website title logic -->
<?php if (!$disabled_global_elements): ?>
<ul id="header-social">
<?php ufclas_get_site_socialnetworks(); ?>
</ul>
<?php endif; ?>
<div id="header-search-wrap">
<?php if (has_nav_menu('header_links')) { //detects if the header_links menu is being used ?>
<nav id="utility-links" class="span-7half" role="navigation">
<ul><?php wp_nav_menu( array('theme_location' => 'header_links', 'container' => false )); ?></ul>
</nav>
<?php } ?>
<div id="searchform-wrap">
<?php $opt_search_box_text = of_get_option("opt_search_box_text"); ?>
<?php $opt_use_wp_search = of_get_option("opt_use_wp_search"); if(!empty($opt_use_wp_search)) { ?>
<form method="get" id="searchform" action="<?php echo home_url('/'); ?>" role="search">
<input type="text" value="<?php if (!empty($opt_search_box_text)) { echo $opt_search_box_text; } else { echo 'Search This Site'; }?>" id="header-search-field" name="s" />
<input type="image" src="<?php bloginfo('template_url'); ?>/images/header-search-btn-orange.jpg" id="header-search-btn" alt="Search Button" name="sa" />
</form>
<?php } else { ?>
<form method="get" id="searchform" action="<?php echo is_ssl()? 'https':'http'; ?>://search.ufl.edu/search" role="search">
<input type="hidden" name="source" id="source" value="web">
<?php $opt_site_specific_search = of_get_option("opt_site_specific_search"); if(!empty($opt_site_specific_search)) { ?>
<input type="hidden" name="site" id="site" value="<?php $parsed_url = parse_url( home_url() ); echo $parsed_url['host']; if ( isset($parsed_url['path']) ) { echo $parsed_url['path']; } ?>">
<?php } ?>
<input type="text" value="<?php if (!empty($opt_search_box_text)) { echo $opt_search_box_text; } else { echo 'Search UF Web'; } ?>" id="header-search-field" name="query" />
<input type="image" src="<?php bloginfo('template_url'); ?>/images/header-search-btn-orange.jpg" id="header-search-btn" alt="Search Button" name="sa" />
</form>
<?php } ?>
</div>
</div><!-- end header-search-wrap -->
<?php // orange header action item box
if (!$detect_mobile || isset($_cookie["UFLmobileFull"])){
$actionitem_text = of_get_option('opt_actionitem_text');
$actionitem_url = of_get_option('opt_actionitem_url');
if (!empty($actionitem_text)) {
echo "<a id='header-actionitem' href='".$actionitem_url."'>".$actionitem_text."</a>";
}
}
?>
</div><!-- end header .container -->
</header>
<?php
if ($opt_responsive) {
if ($detect_mobile && !isset($_COOKIE["UFLmobileFull"])){
include('library/php/responsive-menu.php'); //responsive menu logic
}
}
?>
<?php include('library/php/menu.php'); //menu logic ?>