Advertisement
Guest User

LTM header.php

a guest
Nov 29th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.72 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="content-main">
  6. *
  7. * @package WordPress
  8. * @subpackage Graphene
  9. * @since graphene 1.0
  10. */
  11. global $graphene_settings;
  12. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  13. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  14. <head profile="http://gmpg.org/xfn/11">
  15. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  16. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  17. <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/util-functions.js"></script>
  18. <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/scripts/clear-default-text.js"></script>
  19. <title><?php graphene_title(); ?></title>
  20. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  21. <?php
  22. /* We add some JavaScript to pages with the comment form
  23. * to support sites with threaded comments (when in use).
  24. */
  25. if (is_singular() && get_option('thread_comments'))
  26. wp_enqueue_script('comment-reply');
  27.  
  28. /* Add a print style only for single pages/posts
  29. * and if the theme option is enabled.
  30. */
  31. if (is_singular() && $graphene_settings['print_css'])
  32. add_action('wp_print_styles', 'graphene_print_style');
  33.  
  34. /* Always have wp_head() just before the closing </head>
  35. * tag of your theme, or you will break many plugins, which
  36. * generally use this hook to add elements to <head> such
  37. * as styles, scripts, and meta tags.
  38. */
  39. wp_head();
  40. ?>
  41.  
  42. </head><?php flush(); ?>
  43. <body <?php body_class(); ?>>
  44.  
  45. <?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
  46. <div class="bg-gradient">
  47. <?php endif; ?>
  48.  
  49. <?php do_action( 'graphene_container_before' ); ?>
  50.  
  51. <div id="container">
  52.  
  53. <?php if ($graphene_settings['hide_top_bar'] != true) : ?>
  54. <div id="top-bar">
  55.  
  56. <div id="rss" class="clearfix">
  57. <?php if ($graphene_settings['hide_feed_icon'] != true) : ?>
  58. <?php $custom_feed_url = ($graphene_settings['custom_feed_url']) ? $graphene_settings['custom_feed_url'] : get_bloginfo('rss2_url'); ?>
  59. <a href="<?php echo $custom_feed_url; ?>" title="<?php printf(esc_attr__("Subscribe to %s's RSS feed", 'graphene'), get_bloginfo('name')); ?>" class="rss_link" <?php if ( $graphene_settings['social_media_new_window'] ) { echo 'target="_blank"'; } ?>><span><?php _e('Subscribe to RSS feed', 'graphene'); ?></span></a>
  60. <?php endif; ?>
  61. <?php do_action('graphene_feed_icon'); ?>
  62. </div>
  63.  
  64. <?php
  65. /**
  66. * Retrieves our custom search form.
  67. */
  68. ?>
  69. <?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'top_bar' || $search_box_location == '') : ?>
  70. <div id="top_search">
  71. <?php get_search_form(); ?>
  72. <?php do_action('graphene_top_search'); ?>
  73. </div>
  74. <?php endif; ?>
  75.  
  76. <?php do_action( 'graphene_top_bar' ); ?>
  77.  
  78. </div>
  79. <?php endif; ?>
  80.  
  81. <?php
  82. if ($post)
  83. $post_id = $post->ID;
  84. else
  85. $post_id = false;
  86. $header_img = apply_filters('graphene_header_image', graphene_get_header_image($post_id));
  87.  
  88. /*
  89. * Check if the page uses SSL and change HTTP to HTTPS if true
  90. *
  91. * Experimental. Let me know if there's any problem.
  92. */
  93. if (is_ssl() && stripos($header_img, 'https') === false) {
  94. $header_img = str_replace('http', 'https', $header_img);
  95. }
  96.  
  97. // Gets the colour for header texts, or if we should display them at all
  98. if ('blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR))
  99. $style = ' style="display:none;"';
  100. else
  101. $style = ' style="color:#' . get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) . ';"';
  102. ?>
  103. <div id="header" style="background-image:url(<?php echo $header_img; ?>);">
  104. <?php if ($graphene_settings['link_header_img']) : ?>
  105. <a href="<?php echo home_url(); ?>" id="header_img_link" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>">&nbsp;</a>
  106. <?php endif; ?>
  107.  
  108. <form accept-charset="UTF-8" action="https://hcn88018.infusionsoft.com/app/form/process/0c83e57df5d85f27729e29724b1bb9f7" method="POST" name="Header subscribe" target="">
  109. <input name="inf_form_xid" type="hidden" value="0c83e57df5d85f27729e29724b1bb9f7" />
  110. <input name="inf_form_name" type="hidden" value="Header subscribe" />
  111.  
  112. <input name="infusionsoft_version" type="hidden" value="1.23.6.23" />
  113.  
  114. <input id="inf_field_FirstName" name="inf_field_FirstName" type="text" value="Name" class="inputstyle1 cleardefault" />
  115. <input id="inf_field_Email" name="inf_field_Email" type="text" value="Email" class="inputstyle2 cleardefault" />
  116. <input type="image" src="http://leothemarketer.tigermanenterprises.net/wp-content/uploads/2011/09/signup.jpg" class="submitstyle" alt="Sign Up Now" style="width: 117px; height: 34px" />
  117. </form>
  118. <?php /* Header widget area */
  119. if ($graphene_settings['enable_header_widget'] && is_active_sidebar('header-widget-area')) {
  120. echo '<div class="header-widget">';
  121. dynamic_sidebar('header-widget-area');
  122. echo '</div>';
  123. }
  124. ?>
  125.  
  126. <?php /* The site title and description */
  127. if (is_singular() && !is_front_page()) {
  128. $title_tag = 'h2';
  129. $desc_tag = 'h3';
  130. } else {
  131. $title_tag = 'h1';
  132. $desc_tag = 'h2';
  133. }
  134. ?>
  135. <?php echo '<'.$title_tag; ?> <?php echo $style; ?> class="header_title"><a <?php echo $style; ?> href="<?php echo home_url(); ?>" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"><?php bloginfo('name'); ?></a></<?php echo $title_tag; ?>>
  136. <?php echo '<'.$desc_tag; ?> <?php echo $style; ?> class="header_desc"><?php bloginfo('description'); ?></<?php echo $desc_tag; ?>>
  137. <?php do_action('graphene_header'); ?>
  138. </div>
  139. <div id="nav">
  140. <?php /* The navigation menu */ ?>
  141. <div id="header-menu-wrap">
  142. <?php
  143. /* Header menu */
  144. $args = array(
  145. 'container' => '',
  146. 'menu_id' => 'header-menu',
  147. 'menu_class' => 'menu clearfix',
  148. 'fallback_cb' => 'graphene_default_menu',
  149. 'depth' => 5,
  150. 'theme_location' => 'Header Menu',
  151. );
  152. if ( ! $graphene_settings['disable_menu_desc'] )
  153. $args = array_merge( $args, array( 'walker' => new Graphene_Description_Walker() ) );
  154. wp_nav_menu(apply_filters('graphene_header_menu_args', $args)); ?>
  155.  
  156. <?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'nav_bar') : ?>
  157. <div id="top_search">
  158. <?php get_search_form(); ?>
  159. <?php do_action('graphene_nav_search'); ?>
  160. </div>
  161. <?php endif; ?>
  162.  
  163. </div>
  164.  
  165. <?php
  166. /* Secondary menu */
  167. $args = array(
  168. 'container' => 'div',
  169. 'container_id' => 'secondary-menu-wrap',
  170. 'menu_id' => 'secondary-menu',
  171. 'menu_class' => 'menu clearfix',
  172. 'fallback_cb' => 'none',
  173. 'depth' => 5,
  174. 'theme_location' => 'secondary-menu',
  175. );
  176. wp_nav_menu(apply_filters('graphene_secondary_menu_args', $args));
  177. ?>
  178.  
  179. <div class="menu-bottom-shadow">&nbsp;</div>
  180.  
  181.  
  182. <?php do_action('graphene_top_menu'); ?>
  183.  
  184. </div>
  185.  
  186. <?php do_action('graphene_before_content'); ?>
  187.  
  188. <div id="content" class="clearfix hfeed">
  189. <?php do_action('graphene_before_content-main'); ?>
  190.  
  191. <?php
  192.  
  193. /* Sidebar1 on the left side? */
  194. if ( in_array(graphene_column_mode(), array('two-col-right', 'three-col-right', 'three-col-center')) ){
  195. get_sidebar();
  196. }
  197. /* Sidebar2 on the left side? */
  198. if ( graphene_column_mode() == 'three-col-right' ){
  199. get_sidebar('two');
  200. }
  201.  
  202. ?>
  203.  
  204. <div id="content-main" class="clearfix">
  205. <?php do_action('graphene_top_content'); ?>
  206.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement