Make WordPress Core


Ignore:
Timestamp:
08/14/2013 04:38:01 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: first pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r24832 r25021  
    1111<html <?php language_attributes(); ?> class="no-js">
    1212<head>
    13 <script>
    14 /**
    15  * Replaces class "no-js" with "js" in the <html>-tag when JavaScript is being used.
    16  * Allows easy styling for browsers [not] supporting/running JavaScript.
    17  */
    18 document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');
    19 </script>
    2013<meta charset="<?php bloginfo( 'charset' ); ?>" />
    2114<meta name="viewport" content="width=device-width" />
     
    6053
    6154    <?php $header_image = get_header_image();
    62     if ( ! empty( $header_image ) ) { ?>
     55    if ( ! empty( $header_image ) ) : ?>
    6356    <div id="site-header">
    6457        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
     
    6659        </a>
    6760    </div>
    68     <?php } ?>
     61    <?php endif; ?>
    6962
    70     <header id="masthead" class="site-header clearfix" role="banner">
    71         <div class="header-main clearfix">
     63    <header id="masthead" class="site-header" role="banner">
     64        <div class="header-main clear">
    7265            <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>
    7366
     
    8578
    8679            <nav role="navigation" class="site-navigation primary-navigation">
    87                 <h1 class="assistive-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
    88                 <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
     80                <h1 class="screen-reader-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
     81                <div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
    8982                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    9083            </nav>
     
    9689        <?php if ( $social_links ) : ?>
    9790            <div class="social-links-wrapper hide">
    98                 <ul class="social-links clearfix">
     91                <ul class="social-links clear">
    9992                    <?php if ( is_email( $email_link ) ) : ?>
    10093                    <li class="email-link">
     
    189182
    190183        <div class="search-box-wrapper hide">
    191             <div class="search-box clearfix">
     184            <div class="search-box clear">
    192185            <?php get_search_form(); ?>
    193186            </div>
    194187        </div>
    195     </header><!-- #masthead .site-header -->
     188    </header><!-- #masthead -->
    196189
    197     <div id="main" class="site-main clearfix">
     190    <div id="main" class="site-main">
Note: See TracChangeset for help on using the changeset viewer.