Advertisement
csheldon

header.php

Nov 4th, 2013
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.30 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 class="wf-container wf-clearfix">
  6.  *
  7.  * @package presscore
  8.  * @since presscore 0.1
  9.  */
  10.  
  11. // File Security Check
  12. if ( ! defined( 'ABSPATH' ) ) { exit; }
  13.  
  14. ?><!DOCTYPE html>
  15. <!--[if IE 6]>
  16. <html id="ie6" class="ancient-ie old-ie no-js" <?php language_attributes(); ?>>
  17. <![endif]-->
  18. <!--[if IE 7]>
  19. <html id="ie7" class="ancient-ie old-ie no-js" <?php language_attributes(); ?>>
  20. <![endif]-->
  21. <!--[if IE 8]>
  22. <html id="ie8" class="old-ie no-js" <?php language_attributes(); ?>>
  23. <![endif]-->
  24. <!--[if IE 9]>
  25. <html id="ie9" class="old-ie9 no-js" <?php language_attributes(); ?>>
  26. <![endif]-->
  27. <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
  28. <html class="no-js" <?php language_attributes(); ?>>
  29. <!--<![endif]-->
  30. <head>
  31.     <meta charset="<?php bloginfo( 'charset' ); ?>" />
  32.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  33.     <?php if ( dt_retina_on() ) { dt_core_detect_retina_script(); } ?>
  34.     <title><?php echo presscore_blog_title(); ?></title>
  35.     <link rel="profile" href="http://gmpg.org/xfn/11" />
  36.     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  37.     <!--[if IE]>
  38.     <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  39.     <![endif]-->
  40.     <?php
  41.     echo dt_get_favicon( of_get_option('general-favicon', '') );
  42.  
  43.     // tracking code
  44.     if ( ! is_preview() ) {
  45.         echo of_get_option('general-tracking_code', '');
  46.     }
  47.     ?>
  48.     <?php wp_head(); ?>
  49. </head>
  50.  
  51. <body <?php body_class(); ?>>
  52. <div id="page"<?php if ( 'boxed' == of_get_option('general-layout', 'wide') ) echo ' class="boxed"'; ?>>
  53.  
  54. <?php /* Top Bar */ ?>
  55. <?php if ( of_get_option('top_bar-show', 1) ) : ?>
  56.  
  57.     <!-- !Top-bar -->
  58.     <div id="top-bar" role="complementary">
  59.         <div class="wf-wrap">
  60.             <div class="wf-table wf-mobile-collapsed">
  61.  
  62.                 <div class="wf-td">
  63.  
  64.                     <?php if ( of_get_option('top_bar-contact_show', 1) ) : ?>
  65.                         <div class="mini-contacts wf-float-left">
  66.                             <ul>
  67.                                 <?php presscore_top_bar_contacts_list(); ?>
  68.                             </ul>
  69.                         </div>
  70.                     <?php endif; ?>
  71.  
  72.                     <?php presscore_nav_menu_list('top', 'left'); ?>
  73.  
  74.                     <?php $top_text = of_get_option('top_bar-text', '');
  75.                     if ( $top_text ) :
  76.                     ?>
  77.  
  78.                         <div class="wf-float-left">
  79.                             <?php echo wpautop($top_text); ?>
  80.                         </div>
  81.  
  82.                     <?php endif; ?>
  83.  
  84.                 </div>
  85.  
  86.                 <?php if ( defined('ICL_SITEPRESS_VERSION') ): ?>
  87.                     <div class="wf-td">
  88.  
  89.                         <?php presscore_language_selector_flags(); ?>
  90.  
  91.                     </div>
  92.                 <?php endif; ?>
  93.  
  94.                 <div class="wf-td right-block">
  95.                     <?php
  96.                     // Woocommerce cart here
  97.                     if ( class_exists( 'Woocommerce' ) && of_get_option( 'general-woocommerce_show_mini_cart_in_top_bar', true ) ) :
  98.  
  99.                         get_template_part('inc/mod-woocommerce/mod-woocommerce', 'mini-cart');
  100.                     endif; ?>
  101.  
  102.                     <?php
  103.                     $topbar_soc_icons = presscore_get_topbar_social_icons();
  104.  
  105.                     if ( $topbar_soc_icons ) :
  106.                     ?>
  107.  
  108.                     <?php echo $topbar_soc_icons; ?>
  109.  
  110.                     <?php endif; ?>
  111.                 </div>
  112.  
  113.             </div><!-- .wf-table -->
  114.         </div><!-- .wf-wrap -->
  115.     </div><!-- #top-bar -->
  116.  
  117. <?php endif; ?>
  118.  
  119. <?php
  120. $config = Presscore_Config::get_instance();
  121. $logo_align = of_get_option( 'header-layout', 'left' );
  122. $header_classes = array( 'logo-' . $logo_align );
  123. ?><!-- left, center, classical, classic-centered -->
  124.     <!-- !Header -->
  125.     <header id="header" class="<?php echo esc_attr(implode(' ', $header_classes )); ?>" role="banner"><!-- class="overlap"; class="logo-left", class="logo-center", class="logo-classic" -->
  126.         <div class="wf-wrap">
  127.             <div class="wf-table">
  128.  
  129. <?php if ( 'center' == $logo_align ) : ?>
  130.                 <div class="wf-td">
  131. <?php endif; ?>
  132.  
  133.                 <!-- !- Branding -->
  134.                 <div id="branding"<?php if ( 'center' != $logo_align ) echo ' class="wf-td"'; ?>>
  135.                     <?php $logo = presscore_get_logo_image( presscore_get_header_logos_meta() ); ?>
  136.                     <?php if ( $logo ) : ?>
  137.                     <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo $logo; ?></a>
  138.                     <?php endif; ?>
  139.                     <div id="site-title" class="assistive-text"><?php bloginfo( 'name' ); ?></div>
  140.                     <div id="site-description" class="assistive-text"><?php bloginfo( 'description' ); ?></div>
  141.                 </div>
  142.  
  143. <?php if ( 'classic' == $logo_align ) : ?>
  144.             <?php $info = of_get_option('header-contentarea', false);
  145.             if ( $info ) : ?>
  146.                 <div class="wf-td assistive-info" role="complementary"><?php echo $info; ?></div>
  147.             <?php endif; ?>
  148.             </div>
  149.         </div>
  150.         <div class="navigation-holder">
  151.             <div>
  152. <?php elseif ( in_array($logo_align, array('classic-centered', 'center')) ) : ?>
  153.             </div>
  154.         </div>
  155.         <div class="navigation-holder">
  156.             <div>
  157. <?php endif; ?>
  158.  
  159.                 <?php do_action( 'presscore_primary_navigation' ); ?>
  160.  
  161. <?php if ( 'center' == $logo_align ) : ?>
  162.             </div>
  163. <?php endif; ?>
  164.  
  165.             </div><!-- .wf-table -->
  166.         </div><!-- .wf-wrap -->
  167.     </header><!-- #masthead -->
  168.  
  169.     <?php do_action( 'presscore_before_main_container' ); ?>
  170.  
  171.     <div id="main" <?php presscore_main_container_classes(); ?>><!-- class="sidebar-none", class="sidebar-left", class="sidebar-right" -->
  172.  
  173. <?php if ( presscore_is_content_visible() ): ?>
  174.  
  175.         <div class="main-gradient"></div>
  176.  
  177.         <div class="wf-wrap">
  178.             <div class="wf-container-main">
  179.  
  180.                 <?php do_action( 'presscore_before_content' ); ?>
  181.  
  182. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement