-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
executable file
·156 lines (127 loc) · 5.12 KB
/
header.php
File metadata and controls
executable file
·156 lines (127 loc) · 5.12 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!doctype html>
<!--[if lt IE 7]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9 lt-ie8"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html <?php language_attributes(); ?> class="no-js lt-ie9"><![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?> class="no-js"><!--<![endif]-->
<html>
<head>
<meta charset="utf-8">
<title><?php
global $paged;
// Set empty variable
$page_title = '';
// Add page numeral if needed
if ( $paged > 1 ) {
$page_title = '‹ ' . sprintf( __( 'Página %s', 'pleromabootstrap' ), $paged ) . ' |';
}
// Add page title
wp_title( $page_title ? $page_title : '|', true, 'right' );
// Add sitename
bloginfo( 'name' );
?></title>
<!-- Google Chrome Frame for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- Mobile meta -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.png">
<!-- Pingback -->
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<!-- Wordpress head -->
<?php wp_head(); ?>
</head>
<body class="home blog">
<?php if ( has_nav_menu( 'secondary' ) || ! is_main_site() ) : ?>
<nav class="navbar navbar-inverse navbar-static-top <?php if ( is_main_site() && is_home() ) print 'visible-xs visible-sm' ?>" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#secondary-navbar-collapse">
<span class="sr-only">Navegación</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<?php
// Switch to parent blog
if ( ! is_main_site() )
switch_to_blog( 1 );
// Get menu locations
$menus = get_nav_menu_locations();
// Check if secondary nav exists
if ( isset( $menus['secondary'] ) ) {
$menu = wp_get_nav_menu_object( $menus['secondary'] );
echo $menu->name;
}
// Restore to child blog
if ( ! is_main_site() )
restore_current_blog();
?>
</span>
</div>
<div class="collapse navbar-collapse" id="secondary-navbar-collapse">
<?php
// Use empty string for avoiding default classes
pleroma_secondary_nav( 'navbar-nav' );
?>
</div>
</div>
</nav>
<?php endif; ?>
<!-- #header -->
<div id="header" class="container">
<div class="row">
<!-- .col-xs-6 (logo unam) -->
<div class="col-xs-6">
<a href="http://www.unam.mx" rel="nofollow" class="logo unam">Universidad Nacional Autónoma de México</a>
</div><!-- /.col-xs-6 -->
<!-- .col-xs-6 (logo filosunam) -->
<div class="col-xs-6">
<?php if( ! is_main_site() ) : ?>
<a href="http://www.filos.unam.mx" rel="nofollow" class="logo filosunam">Facultad de Filosofía y Letras, UNAM</a>
<?php else : ?>
<a href="<?php echo get_option( 'siteurl' ) ?>" rel="home" class="logo filosunam"><?php echo get_option( 'blogname' ) ?></a>
<?php endif; ?>
</div><!-- /.col-xs-6 -->
</div>
</div><!-- /#header -->
<div class="container">
<!-- .navbar-primary -->
<nav class="navbar navbar-default navbar-primary" role="navigation">
<!-- .navbar-header -->
<div class="navbar-header">
<a class="navbar-brand visible-xs visible-sm" href="http://www.filos.unam.mx">Facultad de Filosofía y Letras</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-navbar-collapse">
<span class="sr-only">Navegación</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div><!-- /.navbar-header -->
<!-- .navbar-collapse -->
<div class="collapse navbar-collapse" id="primary-navbar-collapse">
<?php
// Displays primary nav
pleroma_primary_nav();
// Displays search form
get_search_form();
?>
</div><!-- /.navbar-collapse -->
</nav><!-- /.navbar-primary -->
<?php
// Displays blog name of child blog
if ( ! is_main_site() ) {
// Displays the blogname
echo '<div class="row">'
. '<div class="page-header page-childblog col-md-9 col-md-offset-3 hidden-xs">'
. '<h1 class="h3">' . get_option( 'blogname' ) . '</h1>'
. '</div>'
. '</div>';
} else {
// Displays the breadcrumb
the_breadcrumb();
}
?>
</div>