[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwelve/ -> header.php (source)

   1  <?php
   2  /**
   3   * The Header template 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, initial-scale=1.0" />
  24  <title><?php wp_title( '|', true, 'right' ); ?></title>
  25  <link rel="profile" href="https://gmpg.org/xfn/11" />
  26  <link rel="pingback" href="<?php echo esc_url( get_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 esc_url( get_template_directory_uri() ); ?>/js/html5.js?ver=3.7.0" type="text/javascript"></script>
  30  <![endif]-->
  31  <?php wp_head(); ?>
  32  </head>
  33  
  34  <body <?php body_class(); ?>>
  35  <?php wp_body_open(); ?>
  36  <div id="page" class="hfeed site">
  37      <a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
  38      <header id="masthead" class="site-header">
  39          <hgroup>
  40              <?php
  41              $is_front         = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) );
  42              $site_name        = get_bloginfo( 'name', 'display' );
  43              $site_description = get_bloginfo( 'description', 'display' );
  44  
  45              if ( $site_name ) :
  46                  ?>
  47                  <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php echo $site_name; ?></a></h1>
  48                  <?php
  49              endif;
  50  
  51              if ( $site_description ) :
  52                  ?>
  53                  <h2 class="site-description"><?php echo $site_description; ?></h2>
  54              <?php endif; ?>
  55          </hgroup>
  56  
  57          <nav id="site-navigation" class="main-navigation">
  58              <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
  59              <?php
  60              wp_nav_menu(
  61                  array(
  62                      'theme_location' => 'primary',
  63                      'menu_class'     => 'nav-menu',
  64                  )
  65              );
  66              ?>
  67          </nav><!-- #site-navigation -->
  68  
  69          <?php if ( get_header_image() ) : ?>
  70          <a href="<?php echo esc_url( home_url( '/' ) ); ?>" <?php echo $is_front ? 'aria-current="page"' : ''; ?> rel="home"><?php twentytwelve_header_image(); ?></a>
  71          <?php endif; ?>
  72      </header><!-- #masthead -->
  73  
  74      <div id="main" class="wrapper">


Generated : Fri Jul 25 08:20:01 2025 Cross-referenced by PHPXref