PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-install/wp-content/themes/garnish/header.php

https://github.com/joshmatz/jmatz-portfolio
PHP | 159 lines | 115 code | 40 blank | 4 comment | 23 complexity | 373724b2a2cbc673a2eac9a03f549593 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <!DOCTYPE html>
  2. <!-- BEGIN html -->
  3. <html <?php language_attributes(); ?>>
  4. <!-- A ThemeZilla design (http://www.themezilla.com) - Proudly powered by WordPress (http://wordpress.org) -->
  5. <!-- BEGIN head -->
  6. <head>
  7. <!-- Meta Tags -->
  8. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  9. <!-- Title -->
  10. <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
  11. <!-- Stylesheets -->
  12. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  13. <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/<?php echo get_option('tz_alt_stylesheet'); ?>" type="text/css" media="screen" />
  14. <!-- RSS & Pingbacks -->
  15. <link rel="alternate" type="application/rss+xml" title="<?php bloginfo( 'name' ); ?> RSS Feed" href="<?php if (get_option('tz_feedburner')) { echo get_option('tz_feedburner'); } else { bloginfo( 'rss2_url' ); } ?>" />
  16. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  17. <?php wp_head(); ?>
  18. <!-- END head -->
  19. </head>
  20. <!-- BEGIN body -->
  21. <body <?php body_class(); ?>>
  22. <!-- BEGIN #container -->
  23. <div id="container">
  24. <div id="loader" data-loader="<?php echo get_template_directory_uri(); ?>/images/<?php if(get_option('tz_alt_stylesheet') == 'dark.css'):?>dark<?php else: ?>light<?php endif; ?>/ajax-loader.gif" class="hidden"></div>
  25. <!-- BEGIN #header -->
  26. <div id="header" class="clearfix">
  27. <!-- BEGIN #header-top -->
  28. <div id="header-top" class="clearfix">
  29. <!-- BEGIN #logo -->
  30. <div id="logo">
  31. <?php /*
  32. If "plain text logo" is set in theme options then use text
  33. if a logo url has been set in theme options then use that
  34. if none of the above then use the default logo.png */
  35. if (get_option('tz_plain_logo') == 'true') { ?>
  36. <a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
  37. <p id="tagline"><?php bloginfo( 'description' ); ?></p>
  38. <?php } elseif (get_option('tz_logo')) { ?>
  39. <a href="<?php echo home_url(); ?>"><img src="<?php echo get_option('tz_logo'); ?>" alt="<?php bloginfo( 'name' ); ?>"/></a>
  40. <?php } else { ?>
  41. <?php if(get_option('tz_alt_stylesheet') == 'dark.css' || get_option('tz_alt_stylesheet') == '') : ?>
  42. <a href="<?php echo home_url(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/dark/logo.png" alt="<?php bloginfo( 'name' ); ?>" /></a>
  43. <?php else: ?>
  44. <a href="<?php echo home_url(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/light/logo.png" alt="<?php bloginfo( 'name' ); ?>" /></a>
  45. <?php endif; ?>
  46. <?php } ?>
  47. <!-- END #logo -->
  48. </div>
  49. <!-- BEGIN #primary-nav -->
  50. <div id="primary-nav">
  51. <?php
  52. wp_nav_menu( array(
  53. 'theme_location' => 'primary-menu',
  54. 'container' => '',
  55. 'before' => '<span>/</span>',
  56. 'fallback_cb' => ''
  57. ) );
  58. ?>
  59. <!-- END #primary-nav -->
  60. </div>
  61. <!-- END #header-top -->
  62. </div>
  63. <?php
  64. $curauth = get_userdata(get_query_var('author'));
  65. if(get_query_var('author_name'))
  66. $curauth = get_userdatabylogin(get_query_var('author_name'));
  67. $tagline = get_option('tz_tagline');
  68. $blog_page = get_option('tz_blog_page');
  69. global $wp_query;
  70. // Took me ages to work this badger out! (Gets the posts page ID)
  71. $page_id = $wp_query->get_queried_object_id();
  72. if($page_id == $blog_page)
  73. $page_id = $blog_page;
  74. $caption = get_post_meta($page_id, 'tz_page_caption', TRUE);
  75. $single = get_post_meta($blog_page, 'tz_page_caption', TRUE);
  76. if($caption == '')
  77. $caption = $tagline;
  78. ?>
  79. <!-- BEGIN #tagline -->
  80. <div id="tagline">
  81. <?php /* If this is a page */ if (is_page() || $page_id == $blog_page || is_singular('portfolio') ) { ?>
  82. <h1 class="page-title"><?php echo stripslashes(nl2br(htmlspecialchars_decode($caption))); ?></h1>
  83. <?php /* If this is a post */ } elseif (is_singular('post')) { ?>
  84. <h1 class="page-title"><?php echo stripslashes(nl2br(htmlspecialchars_decode($single))); ?></h1>
  85. <?php /* If this is a category archive */ } elseif (is_search()) { ?>
  86. <h1 class="page-title"><?php printf(__('Searching for %s', 'framework'), '<span>'.$_GET['s'].'<span>'); ?></h1>
  87. <?php /* If this is a category archive */ } elseif (is_category()) { ?>
  88. <h1 class="page-title"><?php printf(__('All posts in %s', 'framework'), single_cat_title('',false)); ?></h1>
  89. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  90. <h1 class="page-title"><?php printf(__('All posts tagged %s', 'framework'), single_tag_title('',false)); ?></h1>
  91. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  92. <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('F jS, Y'); ?></h1>
  93. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  94. <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('F, Y'); ?></h1>
  95. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  96. <h1 class="page-title"><?php _e('Archive for', 'framework') ?> <?php the_time('Y'); ?></h1>
  97. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  98. <h1 class="page-title"><?php _e('All posts by', 'framework') ?> <?php echo $curauth->display_name; ?></h1>
  99. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  100. <h1 class="page-title"><?php _e('Blog Archives', 'framework') ?></h1>
  101. <?php } ?>
  102. <div class="seperator clearfix">
  103. <span class="line"></span>
  104. </div>
  105. <!-- END #tagline -->
  106. </div>
  107. <!--END #header-->
  108. </div>
  109. <?php
  110. $magic_door = get_option('tz_magic_door');
  111. $post_id = get_option('tz_magic_door_state');
  112. ?>
  113. <div id="loading">Loading...</div>
  114. <div id="door-frame" <?php if($post_id != '') : ?>class="open" data-id="<?php echo $post_id; ?>" <?php endif; ?>>
  115. <div id="magic-door" data-url="<?php echo get_template_directory_uri(); ?>/includes/home-magicdoor.php">
  116. </div>
  117. </div>
  118. <!--BEGIN #content -->
  119. <div id="content" class="clearfix">