PageRenderTime 42ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/blog/wp-content/themes/under-the-influence/header.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 167 lines | 150 code | 3 blank | 14 comment | 30 complexity | d6991f9c8710ade78f54be8bee55fc03 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Under_the_Influence
  5. */
  6. ?>
  7. <?php
  8. global $options;
  9. foreach ($options as $value) {
  10. if (array_key_exists('id',$value)) {
  11. if (get_option( $value['id'] ) === FALSE) {
  12. $$value['id'] = $value['std'];
  13. } else {
  14. $$value['id'] = get_option( $value['id'] );
  15. }
  16. }
  17. }
  18. load_theme_textdomain('uti_theme');
  19. ?>
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  22. <head profile="http://gmpg.org/xfn/11">
  23. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  24. <meta http-equiv="description" content="<?php bloginfo('description'); ?>" />
  25. <title>
  26. <?php
  27. if ( is_single() )
  28. { single_post_title(); _e(' | ', 'uti_theme'); bloginfo('uti_theme');}
  29. elseif ( is_home() || is_front_page() )
  30. { bloginfo('name'); _e(' | ', 'uti_theme'); bloginfo('description'); }
  31. elseif ( is_page() )
  32. { single_post_title(''); _e(' | ', 'uti_theme'); bloginfo('uti_theme'); }
  33. elseif ( is_search() )
  34. { bloginfo('name'); print __(' | Search results for ', 'uti_theme') . get_search_query(); }
  35. elseif ( is_404() )
  36. { bloginfo('name'); _e(' | Not Found', 'uti_theme'); }
  37. else
  38. { bloginfo('name'); wp_title(__(' | ', 'uti_theme')); }
  39. ?>
  40. </title>
  41. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  42. <link rel="stylesheet" href="<?php bloginfo('url') ?>/?css=css" type="text/css" media="screen"/>
  43. <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/print.css" type="text/css" media="print"/>
  44. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  45. <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" />
  46. <link rel="apple-touch-icon" href="<?php bloginfo('template_directory'); ?>/images/iphone.png" />
  47. <!--[if lte IE 7]>
  48. <style type="text/css">
  49. /* these had been applied using CSS hacks in the main stylesheet. I moved them
  50. to this conditional comment - kjacobson */
  51. .alignleft img, .alignright img {
  52. min-width: 150px;
  53. }
  54. .gallery-item {
  55. min-width: 150px;
  56. }
  57. </style>
  58. <![endif]-->
  59. <!--[if lte IE 6]>
  60. <style type="text/css">
  61. /* box-model fix. side bar is floated right and this was falling below it, not beside it, in IE6 */
  62. .singlepage .page {
  63. width: 768px;
  64. }
  65. /* IE6 can't handle the transparency in these PNGs (and filter: wasn't effective), so load GIFs instead and suffer
  66. slight jaggies */
  67. .corner_tr { right: -7px; }
  68. .corner_tl, .corner_tr {
  69. background-image: url(<?php bloginfo('template_directory'); ?>/images/kreis_voll.gif);
  70. }
  71. .corner_br { right: -1px; }
  72. .corner_br, .corner_bl {
  73. background-image: url(<?php bloginfo('template_directory'); ?>/images/kreis.gif);
  74. bottom: -2px;
  75. }
  76. /* trigger hasLayout on decorative lines */
  77. #footer .line {
  78. height: 1%;
  79. }
  80. </style>
  81. <![endif]-->
  82. <?php
  83. if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
  84. $headerimage = get_header_image();
  85. if ($headerimage == ""){
  86. $headerstyle = 1;
  87. } else {
  88. $headerstyle = 2;
  89. }
  90. global $author;
  91. $author = $uti_show_author;
  92. ?>
  93. <?php
  94. global $post; // if outside the loop
  95. if ( !is_singular() && !is_page() && !is_404() && $uti_column == "on") {
  96. wp_enqueue_script('jquery');
  97. wp_enqueue_script('jmasonry');
  98. wp_enqueue_script('jinit_mason');
  99. }
  100. wp_head();
  101. ?>
  102. </head>
  103. <body <?php body_class(); ?><?php if (is_single() || is_page()) {} else if ($uti_column == "on") {echo ' id="three_column"';} ?>>
  104. <div class="ornament"></div>
  105. <div id="page">
  106. <div id="header">
  107. <?php
  108. if ($headerimage == ""){ // Checks if custom header image is set, continues if nothing is set
  109. if ($uti_header_design == 2){ // Executes if header design 2 is chosen
  110. ?>
  111. <div id="title_box">
  112. <b class="corner_tl"></b><!-- presentational tag name for presentational tags - kjacobson -->
  113. <b class="corner_tr"></b>
  114. <h1>
  115. <a href="<?php echo home_url( '/' ); ?>">
  116. <?php bloginfo('name'); ?>
  117. </a>
  118. </h1>
  119. <?php if ($uti_description == "on"){?>
  120. <p class="description">
  121. <?php bloginfo('description'); ?>
  122. </p>
  123. <?php
  124. }
  125. ?>
  126. <b class="corner_bl"></b>
  127. <b class="corner_br"></b>
  128. </div><!--#title_box-->
  129. <?php
  130. } else {
  131. // If custom header image is set
  132. ?>
  133. <h1>
  134. <a href="<?php echo home_url( '/' ); ?>">
  135. <?php bloginfo('name'); ?>
  136. </a>
  137. </h1>
  138. <?php
  139. }
  140. } else {
  141. // Executes when no custom header is set and header design 1 is activated
  142. ?>
  143. <h1>
  144. <a href="<?php echo home_url( '/' ); ?>">
  145. <?php bloginfo('name'); ?>
  146. </a>
  147. </h1>
  148. <?php
  149. }
  150. ?>
  151. <?php
  152. if ($uti_description == "on"){
  153. // Checks if description is shown
  154. ?>
  155. <p class="description">
  156. <?php bloginfo('description'); ?>
  157. </p>
  158. <?php
  159. }
  160. ?>
  161. </div><!--#header-->
  162. <div id="navigation">
  163. <?php wp_nav_menu( array( 'container' => '', 'theme_location' => 'primary', 'fallback_cb' => 'uti_page_menu' ) ); ?>
  164. </div>