PageRenderTime 39ms CodeModel.GetById 14ms RepoModel.GetById 0ms 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. * Globalize $up_options
  41. *
  42. * @global array $up_options Theme Options
  43. */
  44. global $up_options;
  45. ?>
  46. <!doctype html>
  47. <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
  48. <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
  49. <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
  50. <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
  51. <html xmlns="http://www.w3.org/1999/xhtml" <?php
  52. /**
  53. * Output language attributes for the <html> tag
  54. *
  55. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/language_attributes language_attributes}
  56. *
  57. * Added inside the HTML <html> tag, and outputs various HTML
  58. * language attributes, such as language and text-direction.
  59. *
  60. * @param null
  61. * @return string e.g. dir="ltr" lang="en-US"
  62. */
  63. language_attributes();
  64. ?>>
  65. <head>
  66. <title><?php echo up_title(); ?></title>
  67. <meta name="viewport" content="width=device-width,initial-scale=1">
  68. <?php
  69. /**
  70. * Fire the 'up_seo' custom action hook
  71. *
  72. * @param null
  73. * @return mixed any output hooked into 'up_seo'
  74. */
  75. do_action('up_seo');
  76. ?>
  77. <meta http-equiv="Content-Type" content="<?php
  78. /**
  79. * Output the site HTML type
  80. *
  81. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
  82. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
  83. *
  84. * bloginfo() prints (displays/outputs) the data requested.
  85. * get_bloginfo() returns, rather than display/output, the data
  86. *
  87. * The 'html_type' parameter is the document HTML type
  88. * - Defined on the General Settings page in the administration panel
  89. * - Usually "text/html"
  90. *
  91. * @param string $show e.g. 'html_type'; default: none
  92. * @return string e.g. "text/html"
  93. */
  94. bloginfo('html_type');
  95. ?>; charset=<?php
  96. /**
  97. * Output the site HTML type
  98. *
  99. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
  100. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
  101. *
  102. * bloginfo() prints (displays/outputs) the data requested.
  103. * get_bloginfo() returns, rather than display/output, the data
  104. *
  105. * The 'charset' parameter is the document character set
  106. * - Defined in wp-config.php
  107. * - Usually "UTF-8"
  108. *
  109. * @param string $show e.g. 'charset'; default: none
  110. * @return string e.g. "UTF-8"
  111. */
  112. bloginfo('charset');
  113. ?>" />
  114. <link rel="pingback" href="<?php
  115. /**
  116. * Output the pingback URL
  117. *
  118. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/bloginfo bloginfo}
  119. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_bloginfo get_bloginfo}
  120. *
  121. * bloginfo() prints (displays/outputs) the data requested.
  122. * get_bloginfo() returns, rather than display/output, the data
  123. *
  124. * The 'pingback_url' parameter is the URL used to send pingbacks
  125. *
  126. * @param string $show e.g. 'pingback_url'; default: none
  127. * @return string e.g. "{url}"
  128. */bloginfo('pingback_url');
  129. ?>" />
  130. <link rel="icon" href="<?php echo $up_options->favicon; ?>"/>
  131. <link rel="stylesheet" type="text/css" href="<?php
  132. /**
  133. * Return the URL for the default stylesheet
  134. *
  135. * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_stylesheet_uri get_stylesheet_uri}
  136. *
  137. * Returns the value for the URI of the Theme default style sheet (style.css).
  138. *
  139. * @param null
  140. * @return string URL of default stylesheet
  141. */
  142. echo get_stylesheet_uri();
  143. ?>">
  144. <?php
  145. /**
  146. * Fire the 'wp_head' action hook
  147. *
  148. * Codex reference: {@link http://codex.wordpress.org/Hook_Reference/wp_head wp_head}
  149. *
  150. * This hook is used by WordPress core, Themes, and Plugins to
  151. * add scripts, CSS styles, meta tags, etc. to the document head.
  152. *
  153. * MUST come immediately before the closing </head> tag
  154. *
  155. * @param null
  156. * @return mixed any output hooked into 'wp_head'
  157. */
  158. wp_head();
  159. ?>
  160. </head>
  161. <body <?php body_class(); ?>>
  162. <?php
  163. /**
  164. * Fire the 'micro_before_header' custom action hook
  165. *
  166. * @param null
  167. * @return mixed any output hooked into 'micro_before_header'
  168. */
  169. micro_before_header();
  170. ?>
  171. <?php
  172. /**
  173. * Fire the 'micro_header' custom action hook
  174. *
  175. * @param null
  176. * @return mixed any output hooked into 'micro_header'
  177. */
  178. micro_header();
  179. ?>
  180. <?php
  181. /**
  182. * Fire the 'micro_after_header' custom action hook
  183. *
  184. * @param null
  185. * @return mixed any output hooked into 'micro_after_header'
  186. */
  187. micro_after_header();
  188. ?>
  189. <div id="main" class="container clearfix">
  190. <?php
  191. /**
  192. * Fire the 'micro_before_content' custom action hook
  193. *
  194. * @param null
  195. * @return mixed any output hooked into 'micro_before_content'
  196. */
  197. micro_before_content();
  198. ?>
  199. <div id="content" class="clearfix">
  200. <?php
  201. /**
  202. * Fire the 'micro_before_posts' custom action hook
  203. *
  204. * @param null
  205. * @return mixed any output hooked into 'micro_before_posts'
  206. */
  207. micro_before_posts();
  208. ?>