Advertisement
Guest User

Untitled

a guest
Oct 6th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.19 KB | None | 0 0
  1. <?php
  2.  
  3. $theme_options = get_option('option_tree');
  4.  
  5. $sidebar_cookie_2_css = '';
  6. if(isset($_COOKIE['sidebar_cookie_2']) && $_COOKIE['sidebar_cookie_2']!='' && get_option_tree('rb_sidebar_autoclose2', $theme_options) != 'Stick')
  7.     $sidebar_cookie_2_css = $_COOKIE['sidebar_cookie_2'] . 'Skie';
  8.  
  9. /*---------------------------------
  10.     The header of the theme
  11. ------------------------------------*/
  12. ?><!DOCTYPE html>
  13. <!--[if lt IE 8]>    <html <?php language_attributes(); ?> class="ie7" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
  14. <!--[if IE 8]>    <html <?php language_attributes(); ?> class="ie8" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
  15. <!--[if IE 9]>    <html <?php language_attributes(); ?> class="ie9" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
  16. <!--[if gt IE 9]><!--> <html <?php language_attributes(); ?> xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
  17. <head>
  18.  
  19.     <meta charset="<?php bloginfo( 'charset' ); ?>" />
  20.     <meta name="author" content="rubenbristian.com" />
  21.     <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  22.  
  23.     <meta name="format-detection" content="telephone=no">
  24.    
  25.     <title><?php wp_title( '|', true, 'right' ); ?></title>
  26.     <meta name="description" >
  27.  
  28.     <!-- portfolio & gallery redirect script, before anything else -->
  29.     <?php if(!is_search()) : ?>
  30.  
  31.     <script><?php
  32.    
  33.     echo 'if("'. get_post_type() . '"=="portfolio")
  34.         document.location.href = "' . get_page_link(get_option_tree( 'rb_portfolio_page', '', false)) . '#/' . $post->post_name . '";';
  35.    
  36.     echo 'if("'. get_post_type() . '"=="gallery")
  37.         document.location.href = "' . get_page_link(get_option_tree( 'rb_gallery_page', '', false)) . '#/' . $post->post_name . '";';
  38.  
  39.     ?></script>
  40.  
  41.     <?php endif; ?>
  42.    
  43.     <link rel="profile" href="http://gmpg.org/xfn/11" />
  44.     <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  45.     <?php wp_enqueue_style('custom-css', get_template_directory_uri() . '/css/custom.css', null, null); ?>
  46.     <?php wp_enqueue_style('video-css', get_template_directory_uri() . '/css/video/style.css', null, null); ?>
  47.  
  48.     <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  49.  
  50.     <!-- Favicon -->
  51.     <link rel="shortcut icon" type="image/x-icon" href="<?php
  52.         if(get_option_tree('rb_favicon', $theme_options) != '') {
  53.             get_option_tree('rb_favicon', $theme_options, true);
  54.         } else {
  55.             get_template_directory_uri();
  56.             echo '/favicon.ico';
  57.         }   ?>" />
  58.  
  59.  
  60.      <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  61.    
  62.     <?php
  63.  
  64.     //Add comments script
  65.     if(is_page() || is_home() || get_post_type() == 'portfolio' || get_post_type() == 'gallery'){
  66.         wp_deregister_script('comment-reply');
  67.     }
  68.  
  69.     wp_head();
  70.    
  71.     if ( is_user_logged_in() ) : ?>
  72.         <style type="text/css">
  73.             html {
  74.                 margin:0 !important;
  75.             }
  76.         </style>
  77.     <?php endif; ?>
  78.        
  79. </head>
  80. <!-- flush comienzo -->
  81. <?php flush(); ?>
  82. <!-- flush fin -->
  83.  
  84.  
  85. <?php
  86.  
  87.     global $responsive;
  88.  
  89.     //Backgrounds check
  90.     $values = get_post_custom( $post->ID );
  91.     $meta_back = isset($values['rb_post_backgrounda']) ? esc_attr($values['rb_post_backgrounda'][0]) : 'None';
  92.  
  93.     $def_post = '';
  94.     $def_page = '';
  95.     $background_style = '';
  96.  
  97.     $backgrounds = get_option_tree( 'rb_backgrounds', $theme_options, false, true);
  98.     if(isset($backgrounds)) {
  99.         foreach($backgrounds as $background) {
  100.             if(isset($background['default_posts'])){
  101.                 $def_post = $background['image'];
  102.             } else if(isset($background['default_pages'])){
  103.                 $def_page = $background['image'];
  104.             }
  105.             if($meta_back == $background['title'] && $background['title'] != 'None')
  106.                 $meta_back = $background['image'];
  107.         }
  108.     }
  109.  
  110.     if($meta_back != 'None')
  111.         $background_style = ' style="background-image:url(' . $meta_back . ')"';
  112.  
  113.     if($meta_back == 'None' && (is_single() || is_search() || is_archive() || is_page_template('template-blog.php')) && $def_post != '')
  114.         $background_style = ' style="background-image:url(' . $def_post . ')"';
  115.     if($meta_back == 'None' && $def_page != '')
  116.         $background_style = ' style="background-image:url(' . $def_page . ')"';
  117.  
  118.     if(is_page_template('template-portfolio.php') || is_page_template('template-gallery.php'))
  119.         $background_style = '';
  120.  
  121. ?>
  122.  
  123. <body id="body" <?php body_class(array('closedSidebars', $sidebar_cookie_2_css, get_option_tree('rb_site_style', $theme_options), get_option_tree('rb_sidebar_autoclose2', $theme_options), get_option_tree('rb_layout_center', $theme_options), get_option_tree('rb_images_fit', $theme_options), get_option_tree('rb_blog_layout', $theme_options))); ?><?php echo $background_style; ?>>
  124.    
  125.     <div id="sidebar">
  126.  
  127.         <header id="header">
  128.             <div id="logo">
  129.                 <a href="<?php echo home_url(); ?>">
  130.                     <img src="<?php get_option_tree('rb_logo_path', $theme_options, true); ?>" alt="<?php bloginfo('name'); ?>" />
  131.                 </a>
  132.             </div>
  133.             <p id="tagline"><?php bloginfo('description'); ?></p>
  134.         </header>
  135.  
  136.         <nav id="menu">
  137.             <?php wp_nav_menu( array(
  138.                  'container' =>false,
  139.                  'menu_class' => 'main-menu',
  140.                  'echo' => true,
  141.                  'before' => '',
  142.                  'after' => '',
  143.                  'link_before' => '',
  144.                  'link_after' => '',
  145.                  'depth' => 2,
  146.                  'walker' => new menu_default_walker())
  147.              );
  148.             ?>
  149.         </nav>
  150.  
  151.         <?php $responsive = 'global true'; ?>
  152.         <form id="responsiveMenu">
  153.             <select>
  154.                 <option selected data-href="#">Site Navigation</option>
  155.                 <?php wp_nav_menu( array(
  156.                      'container' =>false,
  157.                      'menu_class' => 'responsive-menu',
  158.                      'echo' => true,
  159.                      'before' => '',
  160.                      'after' => '',
  161.                      'link_before' => '',
  162.                      'link_after' => '',
  163.                      'depth' => 2,
  164.                      'walker' => new menu_responsive_walker())
  165.                  );
  166.                 ?>
  167.             </select>
  168.         </form>
  169.         <?php $responsive = 'global false'; ?>
  170.  
  171.         <?php if(is_active_sidebar('rb_side_footer_widget')) : ?>
  172.             <div class="sidewidget">
  173.                 <?php dynamic_sidebar('rb_side_footer_widget'); ?>
  174.             </div>
  175.         <?php endif; ?>
  176.  
  177.         <footer id="copy">
  178.             <p><?php get_option_tree('rb_footer_text', $theme_options, true); ?></p>
  179.         </footer>
  180.  
  181.         <a href="#" id="close">close sidebar</a>
  182.  
  183.     </div>
  184.        
  185.     <div id="content" class="clearfix">
  186.  
  187.         <div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement