PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/header.php

https://github.com/envex/Micro-Theme
PHP | 224 lines | 51 code | 16 blank | 157 comment | 0 complexity | 29b8a6d4a575458c284ccc5d01157b1a MD5 | raw file
  1<?php
  2/**
  3 * Header Template Part
  4 * 
  5 * Template part file that contains the HTML document head and 
  6 * opening HTML body elements, as well as the site header.
  7 *
  8 * This file is called by all primary template pages
  9 * 
 10 * Child Themes can override this template part file globally,
 11 * via "header.php", or in a given specific context, via
 12 * "header-{context}.php". For example, to replace this
 13 * template part file on static Pages, a Child Theme would
 14 * include the file "header-page.php".
 15 * 
 16 * @uses		micro_after_header()		Defined in /inc/hooks.php
 17 * @uses		micro_before_content()		Defined in /inc/hooks.php
 18 * @uses		micro_before_header()		Defined in /inc/hooks.php
 19 * @uses		micro_before_posts()		Defined in /inc/hooks.php
 20 * @uses		micro_body_class()			Defined in /inc/extensions/header-extensions.php
 21 * @uses		micro_header()				Defined in /inc/hooks.php
 22 * @uses		up_title()					Defined in /admin/library/engines/seo-engine.php
 23 * @uses		upfw_get_template_context()	Defined in /admin/functions.php
 24 * 
 25 * @link 		http://codex.wordpress.org/Function_Reference/bloginfo				bloginfo()
 26 * @link 		http://codex.wordpress.org/Function_Reference/body_class			body_class()
 27 * @link 		http://codex.wordpress.org/Function_Reference/do_action				do_action()
 28 * @link 		http://codex.wordpress.org/Function_Reference/get_stylesheet_uri	get_stylesheet_uri()
 29 * @link 		http://codex.wordpress.org/Function_Reference/language_attributes	language_attributes()
 30 * @link 		http://codex.wordpress.org/Function_Reference/wp_enqueue_script		wp_enqueue_script()
 31 * @link 		http://codex.wordpress.org/Function_Reference/wp_head				wp_head()
 32 * 
 33 * @package 	Micro
 34 * @copyright	Copyright (c) 2011, UpThemes
 35 * @license		http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License, v2 (or newer)
 36 *
 37 * @since 		Micro 1.0
 38 */
 39
 40/**
 41 * Globalize $up_options
 42 * 
 43 * @global	array	$up_options		Theme Options
 44 */
 45global $up_options;
 46?>
 47<!doctype html>
 48<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
 49<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
 50<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
 51<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
 52<html xmlns="http://www.w3.org/1999/xhtml" <?php  
 53/**
 54 * Output language attributes for the <html> tag
 55 * 
 56 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/language_attributes language_attributes}
 57 * 
 58 * Added inside the HTML <html> tag, and outputs various HTML
 59 * language attributes, such as language and text-direction.
 60 * 
 61 * @param	null
 62 * @return	string	e.g. dir="ltr" lang="en-US"
 63 */
 64 language_attributes(); 
 65 ?>>
 66<head>
 67
 68	<title><?php echo up_title(); ?></title>
 69
 70	<meta name="viewport" content="width=device-width,initial-scale=1">
 71	
 72	<?php 
 73	/**
 74	 * Fire the 'up_seo' custom action hook
 75	 * 
 76	 * @param	null
 77	 * @return	mixed	any output hooked into 'up_seo'
 78	 */
 79	do_action('up_seo'); 
 80	?>
 81	
 82	<meta http-equiv="Content-Type" content="<?php 
 83	/**
 84	 * Output the site HTML type
 85	 *
 86	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
 87	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
 88	 * 
 89	 * bloginfo() prints (displays/outputs) the data requested. 
 90	 * get_bloginfo() returns, rather than display/output, the data
 91	 * 
 92	 * The 'html_type' parameter is the document HTML type
 93	 *  - Defined on the General Settings page in the administration panel
 94	 *  - Usually "text/html"
 95	 *
 96	 * @param	string	$show	e.g. 'html_type'; default: none
 97	 * @return	string			e.g. "text/html"
 98	 */
 99	 bloginfo('html_type'); 
100	 ?>; charset=<?php 
101	/**
102	 * Output the site HTML type
103	 *
104	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
105	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
106	 * 
107	 * bloginfo() prints (displays/outputs) the data requested. 
108	 * get_bloginfo() returns, rather than display/output, the data
109	 * 
110	 * The 'charset' parameter is the document character set
111	 * 	- Defined in wp-config.php
112	 *  - Usually "UTF-8"
113	 *
114	 * @param	string	$show	e.g. 'charset'; default: none
115	 * @return	string			e.g. "UTF-8"
116	 */
117	 bloginfo('charset'); 
118	 ?>" />
119	
120	<link rel="pingback" href="<?php 
121	/**
122	 * Output the pingback URL
123	 *
124	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
125	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
126	 * 
127	 * bloginfo() prints (displays/outputs) the data requested. 
128	 * get_bloginfo() returns, rather than display/output, the data
129	 * 
130	 * The 'pingback_url' parameter is the URL used to send pingbacks
131	 *
132	 * @param	string	$show	e.g. 'pingback_url'; default: none
133	 * @return	string			e.g. "{url}"
134	 */bloginfo('pingback_url'); 
135	 ?>" />
136	                      
137    <link rel="icon" href="<?php echo $up_options->favicon; ?>"/>
138    
139	<link rel="stylesheet" type="text/css" href="<?php 
140	/**
141	 * Return the URL for the default stylesheet
142	 * 
143	 * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_stylesheet_uri get_stylesheet_uri}
144	 * 
145	 * Returns the value for the URI of the Theme default style sheet (style.css).
146	 * 
147	 * @param	null 
148	 * @return	string	URL of default stylesheet
149	 */
150	 echo get_stylesheet_uri(); 
151	 ?>">
152	
153	<?php 
154	/**
155	 * Fire the 'wp_head' action hook
156	 * 
157	 * Codex reference: {@link http://codex.wordpress.org/Hook_Reference/wp_head wp_head}
158	 * 
159	 * This hook is used by WordPress core, Themes, and Plugins to 
160	 * add scripts, CSS styles, meta tags, etc. to the document head.
161	 * 
162	 * MUST come immediately before the closing </head> tag
163	 * 
164	 * @param	null
165	 * @return	mixed	any output hooked into 'wp_head'
166	 */
167	wp_head(); 
168	?>
169</head>
170<body <?php body_class(); ?>>
171
172	<?php
173	/**
174	 * Fire the 'micro_before_header' custom action hook
175	 * 
176	 * @param	null
177	 * @return	mixed	any output hooked into 'micro_before_header'
178	 */
179	micro_before_header(); 
180	?>
181
182	<?php 
183	/**
184	 * Fire the 'micro_header' custom action hook
185	 * 
186	 * @param	null
187	 * @return	mixed	any output hooked into 'micro_header'
188	 */
189	micro_header(); 
190	?>
191	
192	<?php 
193	/**
194	 * Fire the 'micro_after_header' custom action hook
195	 * 
196	 * @param	null
197	 * @return	mixed	any output hooked into 'micro_after_header'
198	 */
199	micro_after_header(); 
200	?>
201	
202	<div id="main" class="container clearfix">
203
204		<?php 
205		/**
206		 * Fire the 'micro_before_content' custom action hook
207		 * 
208		 * @param	null
209		 * @return	mixed	any output hooked into 'micro_before_content'
210		 */
211		micro_before_content(); 
212		?>
213
214		<div id="content" class="clearfix">
215
216			<?php 
217			/**
218			 * Fire the 'micro_before_posts' custom action hook
219			 * 
220			 * @param	null
221			 * @return	mixed	any output hooked into 'micro_before_posts'
222			 */
223			micro_before_posts(); 
224			?>