PageRenderTime 46ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/twentytwelve/header.php

https://bitbucket.org/julianelve/vendor-wordpress
PHP | 54 lines | 41 code | 4 blank | 9 comment | 1 complexity | 822db1101634985f3838b3389e56263b MD5 | raw file
Possible License(s): AGPL-1.0, LGPL-2.1, GPL-2.0
  1. <?php
  2. /**
  3. * The Header for our theme.
  4. *
  5. * Displays all of the <head> section and everything up till <div id="main">
  6. *
  7. * @package WordPress
  8. * @subpackage Twenty_Twelve
  9. * @since Twenty Twelve 1.0
  10. */
  11. ?><!DOCTYPE html>
  12. <!--[if IE 7]>
  13. <html class="ie ie7" <?php language_attributes(); ?>>
  14. <![endif]-->
  15. <!--[if IE 8]>
  16. <html class="ie ie8" <?php language_attributes(); ?>>
  17. <![endif]-->
  18. <!--[if !(IE 7) | !(IE 8) ]><!-->
  19. <html <?php language_attributes(); ?>>
  20. <!--<![endif]-->
  21. <head>
  22. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  23. <meta name="viewport" content="width=device-width" />
  24. <title><?php wp_title( '|', true, 'right' ); ?></title>
  25. <link rel="profile" href="http://gmpg.org/xfn/11" />
  26. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  27. <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
  28. <!--[if lt IE 9]>
  29. <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
  30. <![endif]-->
  31. <?php wp_head(); ?>
  32. </head>
  33. <body <?php body_class(); ?>>
  34. <div id="page" class="hfeed site">
  35. <header id="masthead" class="site-header" role="banner">
  36. <hgroup>
  37. <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
  38. <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
  39. </hgroup>
  40. <nav id="site-navigation" class="main-navigation" role="navigation">
  41. <h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
  42. <a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
  43. <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
  44. </nav><!-- #site-navigation -->
  45. <?php $header_image = get_header_image();
  46. if ( ! empty( $header_image ) ) : ?>
  47. <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
  48. <?php endif; ?>
  49. </header><!-- #masthead -->
  50. <div id="main" class="wrapper">