Make WordPress Core

Changeset 31260


Ignore:
Timestamp:
01/21/2015 08:48:45 PM (10 years ago)
Author:
lancewillett
Message:

Twenty Thirteen: fix escaping and minor code style issues. See #29127.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r30795 r31260  
    147147            'subset' => urlencode( 'latin,latin-ext' ),
    148148        );
    149         $fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" );
     149        $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
    150150    }
    151151
     
    320320function twentythirteen_entry_meta() {
    321321    if ( is_sticky() && is_home() && ! is_paged() )
    322         echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>';
     322        echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
    323323
    324324    if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
     
    414414        'post_mime_type' => 'image',
    415415        'order'          => 'ASC',
    416         'orderby'        => 'menu_order ID'
     416        'orderby'        => 'menu_order ID',
    417417    ) );
    418418
  • trunk/src/wp-content/themes/twentythirteen/inc/custom-header.php

    r30327 r31260  
    217217 */
    218218function twentythirteen_admin_header_image() {
    219     ?>
    220     <div id="headimg" style="background: url(<?php header_image(); ?>) no-repeat scroll top; background-size: 1600px auto;">
    221         <?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?>
     219    $style = 'color: #' . get_header_textcolor() . ';';
     220    if ( ! display_header_text() ) {
     221        $style = 'display: none;';
     222    }
     223    ?>
     224    <div id="headimg" style="background: url(<?php echo esc_url( get_header_image() ); ?>) no-repeat scroll top; background-size: 1600px auto;">
    222225        <div class="home-link">
    223             <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
    224             <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
     226            <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
     227            <h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
    225228        </div>
    226229    </div>
  • trunk/src/wp-content/themes/twentythirteen/taxonomy-post_format.php

    r25522 r31260  
    2121        <?php if ( have_posts() ) : ?>
    2222            <header class="archive-header">
    23                 <h1 class="archive-title"><?php printf( __( '%s Archives', 'twentythirteen' ), '<span>' . get_post_format_string( get_post_format() ) . '</span>' ); ?></h1>
     23                <h1 class="archive-title"><?php printf( __( '%s Archives', 'twentythirteen' ), '<span>' . esc_html( get_post_format_string( get_post_format() ) ) . '</span>' ); ?></h1>
    2424            </header><!-- .archive-header -->
    2525
Note: See TracChangeset for help on using the changeset viewer.