WordPress.org

Make WordPress Core

Changeset 31266


Ignore:
Timestamp:
01/22/2015 12:41:58 AM (6 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/src/wp-content/themes/twentyten
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyten/archive.php

    r25746 r31266  
    5555     * called loop-archive.php and that will be used instead.
    5656     */
    57      get_template_part( 'loop', 'archive' );
     57    get_template_part( 'loop', 'archive' );
    5858?>
    5959
  • trunk/src/wp-content/themes/twentyten/author.php

    r25746 r31266  
    2626?>
    2727
    28                 <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>
     28                <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
    2929
    3030<?php
     
    6464     * called loop-author.php and that will be used instead.
    6565     */
    66      get_template_part( 'loop', 'author' );
     66    get_template_part( 'loop', 'author' );
    6767?>
    6868            </div><!-- #content -->
  • trunk/src/wp-content/themes/twentyten/footer.php

    r25746 r31266  
    2525
    2626            <div id="site-info">
    27                 <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
     27                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    2828                    <?php bloginfo( 'name' ); ?>
    2929                </a>
  • trunk/src/wp-content/themes/twentyten/functions.php

    r30145 r31266  
    571571        $galleries = get_post_galleries( get_the_ID(), false );
    572572        if ( isset( $galleries[0]['ids'] ) )
    573             $images = explode( ',', $galleries[0]['ids'] );
     573            $images = explode( ',', $galleries[0]['ids'] );
    574574    } else {
    575575        $pattern = get_shortcode_regex();
  • trunk/src/wp-content/themes/twentyten/header.php

    r28250 r31266  
    3131    // Add a page number if necessary:
    3232    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    33         echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
     33        echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ) );
    3434
    3535    ?></title>
     
    6363                <<?php echo $heading_tag; ?> id="site-title">
    6464                    <span>
    65                         <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
     65                        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    6666                    </span>
    6767                </<?php echo $heading_tag; ?>>
     
    9797                        }
    9898                    ?>
    99                         <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
     99                        <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" />
    100100                    <?php endif; ?>
    101101            </div><!-- #branding -->
  • trunk/src/wp-content/themes/twentyten/index.php

    r25746 r31266  
    2525             * called loop-index.php and that will be used instead.
    2626             */
    27              get_template_part( 'loop', 'index' );
     27            get_template_part( 'loop', 'index' );
    2828            ?>
    2929            </div><!-- #content -->
  • trunk/src/wp-content/themes/twentyten/loop-attachment.php

    r28585 r31266  
    8181        else
    8282            // or get the URL of the first image attachment
    83             $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
     83            $next_attachment_url = get_attachment_link( $attachments[0]->ID );
    8484    } else {
    8585        // or, if there's only 1 image attachment, get the URL of the image
     
    112112                        </div><!-- #nav-below -->
    113113<?php else : ?>
    114                         <a href="<?php echo esc_url( wp_get_attachment_url() ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
     114                        <a href="<?php echo esc_url( wp_get_attachment_url() ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo esc_html( basename( get_permalink() ) ); ?></a>
    115115<?php endif; ?>
    116116                        </div><!-- .entry-attachment -->
    117                         <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
     117                        <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    118118
    119119<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
  • trunk/src/wp-content/themes/twentyten/loop-single.php

    r25868 r31266  
    4747                            <?php the_author_meta( 'description' ); ?>
    4848                            <div id="author-link">
    49                                 <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">
     49                                <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    5050                                    <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
    5151                                </a>
  • trunk/src/wp-content/themes/twentyten/loop.php

    r25746 r31266  
    8282                        </div><!-- .gallery-thumb -->
    8383                        <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
    84                                 'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
     84                                'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
    8585                                number_format_i18n( $total_images )
    8686                            ); ?></em></p>
     
    9292            <div class="entry-utility">
    9393            <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
    94                 <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
     94                <a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    9595                <span class="meta-sep">|</span>
    9696            <?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?>
    97                 <a href="<?php echo get_category_link( $gallery ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
     97                <a href="<?php echo esc_url( get_category_link( $gallery ) ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    9898                <span class="meta-sep">|</span>
    9999            <?php endif; ?>
  • trunk/src/wp-content/themes/twentyten/onecolumn-page.php

    r25746 r31266  
    2424             * called loop-page.php and that will be used instead.
    2525             */
    26              get_template_part( 'loop', 'page' );
     26            get_template_part( 'loop', 'page' );
    2727            ?>
    2828
  • trunk/src/wp-content/themes/twentyten/search.php

    r25746 r31266  
    2121                 * called loop-search.php and that will be used instead.
    2222                 */
    23                  get_template_part( 'loop', 'search' );
     23                get_template_part( 'loop', 'search' );
    2424                ?>
    2525<?php else : ?>
  • trunk/src/wp-content/themes/twentyten/style.css

    r30967 r31266  
    88License: GNU General Public License v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    10 Tags: black, blue, white, two-columns, fixed-layout, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header
     10Tags: black, blue, white, two-columns, fixed-layout, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header, featured-images, featured-image-header
    1111Text Domain: twentyten
    1212*/
  • trunk/src/wp-content/themes/twentyten/tag.php

    r25746 r31266  
    2323 * called loop-tag.php and that will be used instead.
    2424 */
    25  get_template_part( 'loop', 'tag' );
     25get_template_part( 'loop', 'tag' );
    2626?>
    2727            </div><!-- #content -->
Note: See TracChangeset for help on using the changeset viewer.