WordPress.org

Make WordPress Core

Changeset 31250


Ignore:
Timestamp:
01/20/2015 07:02:53 PM (6 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
8 edited

Legend:

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

    r26260 r31250  
    4141        <?php
    4242            wp_list_comments( array(
    43                 'style'      => 'ol',
    44                 'short_ping' => true,
    45                 'avatar_size'=> 34,
     43                'style'       => 'ol',
     44                'short_ping'  => true,
     45                'avatar_size' => 34,
    4646            ) );
    4747        ?>
  • trunk/src/wp-content/themes/twentyfourteen/featured-content.php

    r26556 r31250  
    2323            setup_postdata( $post );
    2424
    25              // Include the featured content template.
     25            // Include the featured content template.
    2626            get_template_part( 'content', 'featured-post' );
    2727        endforeach;
  • trunk/src/wp-content/themes/twentyfourteen/image.php

    r28462 r31250  
    2929                        <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span>
    3030
    31                         <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo $metadata['width']; ?> &times; <?php echo $metadata['height']; ?></a></span>
     31                        <span class="full-size-link"><a href="<?php echo esc_url( wp_get_attachment_url() ); ?>"><?php echo esc_html( $metadata['width'] ); ?> &times; <?php echo esc_html( $metadata['height'] ); ?></a></span>
    3232
    3333                        <span class="parent-post-link"><a href="<?php echo esc_url( get_permalink( $post->post_parent ) ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span>
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r30146 r31250  
    141141        <img src="<?php header_image(); ?>" alt="">
    142142        <?php endif; ?>
    143         <h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
     143        <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( sprintf( 'color: #%s;', get_header_textcolor() ) ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
    144144    </div>
    145145<?php
  • trunk/src/wp-content/themes/twentyfourteen/inc/featured-content.php

    r29903 r31250  
    326326
    327327        $settings = self::get_setting();
    328         foreach( $terms as $order => $term ) {
     328        foreach ( $terms as $order => $term ) {
    329329            if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    330330                unset( $terms[ $order ] );
     
    370370
    371371        $settings = self::get_setting();
    372         foreach( $terms as $order => $term ) {
     372        foreach ( $terms as $order => $term ) {
    373373            if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    374374                unset( $terms[ $term->term_id ] );
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r28248 r31250  
    108108            ?>
    109109            <h1 class="widget-title <?php echo esc_attr( $format ); ?>">
    110                 <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo $title; ?></a>
     110                <a class="entry-format" href="<?php echo esc_url( get_post_format_link( $format ) ); ?>"><?php echo esc_html( $title ); ?></a>
    111111            </h1>
    112112            <ol>
     
    262262            <select id="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>" class="widefat" name="<?php echo esc_attr( $this->get_field_name( 'format' ) ); ?>">
    263263                <?php foreach ( $this->formats as $slug ) : ?>
    264                 <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo get_post_format_string( $slug ); ?></option>
     264                <option value="<?php echo esc_attr( $slug ); ?>"<?php selected( $format, $slug ); ?>><?php echo esc_html( get_post_format_string( $slug ) ); ?></option>
    265265                <?php endforeach; ?>
    266266            </select>
  • trunk/src/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js

    r26332 r31250  
    1515        }
    1616
    17         if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
     17        if ( url && ( ! $( 'textarea, input' ).is( ':focus' ) ) ) {
    1818            window.location = url;
    1919        }
  • trunk/src/wp-content/themes/twentyfourteen/js/slider.js

    r26810 r31250  
    525525            var slide = slider.slides.first();
    526526
    527             slider.w = ( slider.viewport===undefined ) ? slider.width() : slider.viewport.width();
     527            slider.w = ( slider.viewport === undefined ) ? slider.width() : slider.viewport.width();
    528528            slider.h = slide.height();
    529529            slider.boxPadding = slide.outerWidth() - slide.width();
Note: See TracChangeset for help on using the changeset viewer.