Advertisement
Guest User

dorotta header.php

a guest
Aug 3rd, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.38 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Header for our theme.
  4. *
  5. * Displays all of the <head> section and everything up till < div id="main" >
  6. *
  7. * @package WordPress
  8. * @subpackage Weaver II
  9. * @since Weaver II 1.0
  10. */
  11. weaverii_setup_mobile();
  12. ?><!DOCTYPE html>
  13. <!--[if IE 6]>
  14. <html id="ie6" <?php language_attributes(); ?>>
  15. <![endif]-->
  16. <!--[if IE 7]>
  17. <html id="ie7" <?php language_attributes(); ?>>
  18. <![endif]-->
  19. <!--[if IE 8]>
  20. <html id="ie8" <?php language_attributes(); ?>>
  21. <![endif]-->
  22. <!--[if IE 9]>
  23. <html id="ie9" <?php language_attributes(); ?>>
  24. <![endif]-->
  25. <!--[if !(IE 6) | !(IE 7) | !(IE 8) ] | !(IE 9) ><!-->
  26. <html <?php language_attributes(); ?>>
  27. <!--<![endif]-->
  28. <head>
  29. <div id="header" onclick="location.href='http://dorotta.com/';" style="cursor: pointer;">
  30. <link href='http://fonts.googleapis.com/css?family=Poiret+One&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
  31. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  32. <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes' />
  33. <title><?php // ++++++ HEAD TITLE ++++++
  34. wp_title(''); // the title - will run through our filter
  35. ?></title>
  36.  
  37. <link rel="profile" href="http://gmpg.org/xfn/11" />
  38. <?php
  39. if (($custom = weaverii_getopt('wii_custom_style')) != '') // set which style sheet we are using
  40. $sheet = $custom;
  41. else if (weaverii_getopt_checked('wii_minimial_style'))
  42. $sheet = weaverii_relative_url('style-minimal.css');
  43. else
  44. $sheet = get_bloginfo( 'stylesheet_url' );
  45. ?>
  46. <link rel="stylesheet" type="text/css" media="all" href="<?php echo $sheet; ?>" />
  47. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  48. <!--[if lt IE 9]>
  49. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  50. <![endif]-->
  51.  
  52. <?php // ++++ CSS AND CUSTOM SCRIPTS ++++
  53. $icon = weaverii_getopt('_wii_favicon_url');
  54. if ($icon != '') {
  55. $url = parse_url($icon,PHP_URL_PATH);
  56. echo "<link rel=\"shortcut icon\" href=\"$url\" />\n";
  57. }
  58. $icon = weaverii_getopt('_wii_apple_touch_icon_url');
  59. if ($icon != '') {
  60. $url = parse_url($icon,PHP_URL_PATH);
  61. echo "<link rel=\"apple-touch-icon\" href=\"$url\" />\n";
  62. }
  63. weaverii_facebook_meta();
  64.  
  65. if (WEAVERII_FORCE_RTL) {
  66. wp_register_style('weaverii-rtl-style-sheet',weaverii_relative_url('rtl.css'));
  67. wp_enqueue_style('weaverii-rtl-style-sheet');
  68. }
  69.  
  70. if (!weaverii_use_inline_css(weaverii_get_css_filename())) { // don't generate inline CSS
  71. $vers = weaverii_getopt('wii_style_version');
  72. if (!$vers) $vers = '1';
  73. else $vers = sprintf("%d",$vers);
  74. wp_register_style('weaverii-style-sheet',weaverii_get_css_url(),array(),$vers);
  75. wp_enqueue_style('weaverii-style-sheet');
  76. }
  77.  
  78. weaverii_pro_wp_head(); // anything needed for Pro Version
  79.  
  80. wp_head();
  81.  
  82. // follow are runtime scripts that can't be called with enqueue_script
  83.  
  84. if (weaverii_getopt('wii_use_superfish') || weaverii_mobile_usesf()) {
  85. if (!weaverii_mobile_usesf())
  86. echo("<script type=\"text/javascript\">
  87. jQuery(function(){jQuery('ul.sf-menu').superfish({animation: {opacity:'show',height:'show' }, speed: 300});});
  88. </script>\n");
  89. else // need different stuff for mobile - works better on more browsers
  90. echo("<script type=\"text/javascript\">
  91. jQuery(function(){jQuery('ul.sf-menu').superfish({ disableHI:true, speed:200, dropshadows:false});});
  92. </script>\n");
  93. }
  94. if (weaverii_getopt_checked('wvr_flow_to_bottom')) {
  95. ?>
  96. <script type="text/javascript">
  97. jQuery(window).load(function() {
  98. jQuery(".equal_height").equalHeights();
  99. });
  100. </script>
  101. <?php
  102. }
  103. if (weaverii_getopt('wii_hide_tooltip')) {
  104. ?>
  105. <script type="text/javascript">
  106. jQuery(document).ready(function() {
  107. jQuery('a[title]').mouseover(function(e) {
  108. var tip = jQuery(this).attr('title');
  109. jQuery(this).attr('title','');
  110. }).mouseout(function() {
  111. jQuery(this).attr('title',jQuery('.tipBody').html());
  112. });
  113. });
  114. </script>
  115. <?php
  116.  
  117. }
  118. ?>
  119.  
  120. </head>
  121.  
  122. <body <?php body_class(); ?>>
  123. <?php
  124. weaverii_trace_template(__FILE__);
  125. weaverii_trace_mobile();
  126. weaverii_inject_area('prewrapper');
  127.  
  128. if (!weaverii_getopt_checked('wii_header_first')) // put the header before the wrapper?
  129. echo "<div id=\"wrapper\" class=\"hfeed\">\n";
  130.  
  131. weaverii_inject_area('preheader');
  132.  
  133. if (!weaverii_is_checked_page_opt('ttw-hide-header')) {
  134. ?>
  135. <header id="branding" role="banner">
  136. <?php
  137. /* ======== SITE LOGO and TITLE ======== */
  138. $title = (weaverii_getopt('_wii_mobile_site_title') && weaverii_use_mobile('mobile') )
  139. ? esc_html(weaverii_getopt('_wii_mobile_site_title')) : esc_attr( get_bloginfo( 'name', 'display' ) );
  140. ?>
  141. <div id="site-logo"<?php weaverii_hide_site_title();?>></div>
  142. <div id="site-logo-link" onclick="location.href='<?php echo home_url( '/' ); ?>';" style="cursor:pointer;"<?php weaverii_hide_site_title();?>></div>
  143. <hgroup class="title-description">
  144. <h1 id="site-title"<?php echo weaverii_hide_site_title();?>><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"<?php weaverii_hide_site_title();?>><?php echo $title; ?></a></span></h1>
  145. <h2 id="site-description"<?php weaverii_hide_site_title();?>><?php bloginfo( 'description' ); ?></h2>
  146. </hgroup>
  147.  
  148. <?php /* ======== TOP MENU ======== */
  149. get_template_part('nav','top');
  150. weaverii_mobile_toggle('header'); // display toggle button
  151. weaverii_inject_area('header'); // inject header HTML
  152.  
  153. get_sidebar('header');
  154.  
  155. weaveriip_header_insert(); // add W-II Pro injection
  156.  
  157. /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */
  158. if (function_exists('show_media_header'))
  159. show_media_header(); // Plugin support: **Dynamic Headers**
  160.  
  161. /* ======== HEADER IMAGE ======== */
  162.  
  163. if (!(weaverii_is_checked_page_opt('ttw-hide-header-image') && !is_search())
  164. && !(weaverii_getopt_checked('wii_normal_hide_header_image') && !weaverii_use_mobile('mobile'))
  165. && !(weaverii_getopt_checked('wii_mobile_hide_header_image') && weaverii_use_mobile('mobile')) ) {
  166. if (!weaverii_getopt_checked('wii_hide_header_image') && !(weaverii_getopt('wii_hide_header_image_front') && is_front_page() )) {
  167. echo("\t\t<div id=\"header_image\">\n");
  168. if (weaverii_getopt('wii_link_site_image')) {
  169. ?>
  170. <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
  171. <?php
  172. }
  173. /* Check if this is a post or page, if it has a thumbnail, and if it's a big one */
  174. if ( is_singular() && !weaverii_getopt('wii_hide_featured_header')
  175. && has_post_thumbnail( $post->ID )
  176. && ($image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) /* $src, $width, $height */
  177. && $image[1] >= HEADER_IMAGE_WIDTH) {
  178. echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
  179. } else {
  180. if (weaverii_use_mobile('mobile') && weaverii_getopt('_wii_mobile_header_url')) {
  181. echo '<img src="' . esc_attr(weaverii_getopt('_wii_mobile_header_url')) .
  182. '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' . "\n";
  183. } else if (weaverii_use_mobile('tablet') && weaverii_getopt('_wii_mobile_tablet_header_url')) {
  184. echo '<img src="' . esc_attr(weaverii_getopt('_wii_mobile_tablet_header_url')) .
  185. '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />' . "\n";
  186. } else {
  187. $hdr = get_header_image();
  188. if ($hdr) {
  189. ?>
  190. <img src="<?php echo $hdr ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
  191. <?php } else { // don't include alt on empty header images
  192. ?>
  193. <img src="" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" />
  194. <?php }
  195. }
  196. }
  197. if (weaverii_getopt('wii_link_site_image')) echo("</a>\n"); /* need to close link */
  198. echo("\t\t</div><!-- #header_image -->\n");
  199. } /* closes header > 0 */
  200. } /* end wii_hide-header-image */
  201.  
  202. /* ======== BOTTOM MENU ======== */
  203.  
  204. get_template_part('nav','bottom');
  205.  
  206. ?>
  207. </header><!-- #branding -->
  208. <?php
  209. } // end hide-header
  210.  
  211. if (weaverii_getopt_checked('wii_header_first')) echo "<div id=\"wrapper\" class=\"hfeed\">\n";
  212. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement