WordPress.org

Make WordPress Core

Changeset 29842


Ignore:
Timestamp:
10/06/2014 12:43:55 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Bundled themes: Add an alt attribute with the site title for header images linked to the home page.

props rianrietveld.
fixes #15926.

Location:
trunk/src/wp-content/themes
Files:
3 edited

Legend:

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

    r28341 r29842  
    112112                        }
    113113                        ?>
    114                     <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
     114                    <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    115115                <?php endif; // end check for featured image or standard header ?>
    116116            </a>
  • trunk/src/wp-content/themes/twentyfourteen/header.php

    r28341 r29842  
    3636    <div id="site-header">
    3737        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    38             <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="">
     38            <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
    3939        </a>
    4040    </div>
  • trunk/src/wp-content/themes/twentytwelve/header.php

    r29095 r29842  
    4747
    4848        <?php if ( get_header_image() ) : ?>
    49         <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
     49        <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
    5050        <?php endif; ?>
    5151    </header><!-- #masthead -->
Note: See TracChangeset for help on using the changeset viewer.