Make WordPress Core

Ticket #29127: 29127.twentyfourteen.patch

File 29127.twentyfourteen.patch, 7.2 KB (added by lancewillett, 10 years ago)

Twenty Fourteen cleanup

  • wp-content/themes/twentyfourteen/comments.php

     
    4040        <ol class="comment-list">
    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                ?>
    4848        </ol><!-- .comment-list -->
  • wp-content/themes/twentyfourteen/featured-content.php

     
    2222                foreach ( (array) $featured_posts as $order => $post ) :
    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;
    2828
  • wp-content/themes/twentyfourteen/functions.php

     
    211211         * by Lato, translate this to 'off'. Do not translate into your own language.
    212212         */
    213213        if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) {
    214                 $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" );
     214                $font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), '//fonts.googleapis.com/css' );
    215215        }
    216216
    217217        return $font_url;
  • wp-content/themes/twentyfourteen/image.php

     
    2828
    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>
    3434                                                <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
  • wp-content/themes/twentyfourteen/inc/custom-header.php

     
    140140                <?php if ( get_header_image() ) : ?>
    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( '/' ) ); ?>"><?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( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
    144144        </div>
    145145<?php
    146146}
  • wp-content/themes/twentyfourteen/inc/featured-content.php

     
    327327                }
    328328
    329329                $settings = self::get_setting();
    330                 foreach( $terms as $order => $term ) {
     330                foreach ( $terms as $order => $term ) {
    331331                        if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    332332                                unset( $terms[ $order ] );
    333333                        }
     
    371371                }
    372372
    373373                $settings = self::get_setting();
    374                 foreach( $terms as $order => $term ) {
     374                foreach ( $terms as $order => $term ) {
    375375                        if ( ( $settings['tag-id'] === $term->term_id || $settings['tag-name'] === $term->name ) && 'post_tag' === $term->taxonomy ) {
    376376                                unset( $terms[ $term->term_id ] );
    377377                        }
  • wp-content/themes/twentyfourteen/inc/widgets.php

     
    107107                        echo $args['before_widget'];
    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>
    113113
     
    261261                        <p><label for="<?php echo esc_attr( $this->get_field_id( 'format' ) ); ?>"><?php _e( 'Post format to show:', 'twentyfourteen' ); ?></label>
    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>
    267267                <?php
  • wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js

     
    1414                        url = $( '.entry-attachment a' ).attr( 'href' );
    1515                }
    1616
    17                 if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
     17                if ( url && ( ! $( 'textarea, input' ).is( ':focus' ) ) ) {
    1818                        window.location = url;
    1919                }
    2020        } );
  • wp-content/themes/twentyfourteen/js/slider.js

     
    524524                slider.doMath = function() {
    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();
    530530