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

Built from https://develop.svn.wordpress.org/trunk@31266


git-svn-id: http://core.svn.wordpress.org/trunk@31247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2015-01-22 00:42:44 +00:00
parent dcf53d5bbb
commit ff5628169e
14 changed files with 21 additions and 21 deletions

View File

@ -25,7 +25,7 @@ get_header(); ?>
the_post(); the_post();
?> ?>
<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> <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>
<?php <?php
// If a user has filled out their description, show a bio on their entries. // If a user has filled out their description, show a bio on their entries.

View File

@ -24,7 +24,7 @@
?> ?>
<div id="site-info"> <div id="site-info">
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?> <?php bloginfo( 'name' ); ?>
</a> </a>
</div><!-- #site-info --> </div><!-- #site-info -->

View File

@ -30,7 +30,7 @@
// Add a page number if necessary: // Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ) );
?></title> ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="profile" href="http://gmpg.org/xfn/11" />
@ -62,7 +62,7 @@
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?> <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title"> <<?php echo $heading_tag; ?> id="site-title">
<span> <span>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span> </span>
</<?php echo $heading_tag; ?>> </<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div> <div id="site-description"><?php bloginfo( 'description' ); ?></div>
@ -96,7 +96,7 @@
$header_image_height = HEADER_IMAGE_HEIGHT; $header_image_height = HEADER_IMAGE_HEIGHT;
} }
?> ?>
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" /> <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" />
<?php endif; ?> <?php endif; ?>
</div><!-- #branding --> </div><!-- #branding -->

View File

@ -80,7 +80,7 @@
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else else
// or get the URL of the first image attachment // or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); $next_attachment_url = get_attachment_link( $attachments[0]->ID );
} else { } else {
// or, if there's only 1 image attachment, get the URL of the image // or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url(); $next_attachment_url = wp_get_attachment_url();
@ -111,10 +111,10 @@
<div class="nav-next"><?php next_image_link( false ); ?></div> <div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below --> </div><!-- #nav-below -->
<?php else : ?> <?php else : ?>
<a href="<?php echo esc_url( wp_get_attachment_url() ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a> <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>
<?php endif; ?> <?php endif; ?>
</div><!-- .entry-attachment --> </div><!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div> <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>

View File

@ -46,7 +46,7 @@
<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?> <?php the_author_meta( 'description' ); ?>
<div id="author-link"> <div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?> <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
</a> </a>
</div><!-- #author-link --> </div><!-- #author-link -->

View File

@ -81,7 +81,7 @@
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>
</div><!-- .gallery-thumb --> </div><!-- .gallery-thumb -->
<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' ), <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' ),
'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
number_format_i18n( $total_images ) number_format_i18n( $total_images )
); ?></em></p> ); ?></em></p>
<?php endif; // end twentyten_get_gallery_images() check ?> <?php endif; // end twentyten_get_gallery_images() check ?>
@ -91,10 +91,10 @@
<div class="entry-utility"> <div class="entry-utility">
<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> <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>
<span class="meta-sep">|</span> <span class="meta-sep">|</span>
<?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?> <?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?>
<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> <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>
<span class="meta-sep">|</span> <span class="meta-sep">|</span>
<?php endif; ?> <?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>

View File

@ -7,7 +7,7 @@ Author URI: http://wordpress.org/
Version: 1.8 Version: 1.8
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
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 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, featured-images, featured-image-header
Text Domain: twentyten Text Domain: twentyten
*/ */

View File

@ -22,7 +22,7 @@ get_header(); ?>
* If you want to overload this in a child theme then include a file * If you want to overload this in a child theme then include a file
* called loop-tag.php and that will be used instead. * called loop-tag.php and that will be used instead.
*/ */
get_template_part( 'loop', 'tag' ); get_template_part( 'loop', 'tag' );
?> ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #container --> </div><!-- #container -->

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31265'; $wp_version = '4.2-alpha-31266';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.