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

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


git-svn-id: http://core.svn.wordpress.org/trunk@31241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2015-01-21 20:49:22 +00:00
parent 48ff8e7ab4
commit c25f0ae8f8
4 changed files with 12 additions and 9 deletions

View File

@ -146,7 +146,7 @@ function twentythirteen_fonts_url() {
'family' => urlencode( implode( '|', $font_families ) ),
'subset' => urlencode( 'latin,latin-ext' ),
);
$fonts_url = add_query_arg( $query_args, "//fonts.googleapis.com/css" );
$fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
}
return $fonts_url;
@ -319,7 +319,7 @@ if ( ! function_exists( 'twentythirteen_entry_meta' ) ) :
*/
function twentythirteen_entry_meta() {
if ( is_sticky() && is_home() && ! is_paged() )
echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>';
echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
twentythirteen_entry_date();
@ -413,7 +413,7 @@ function twentythirteen_the_attached_image() {
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
'orderby' => 'menu_order ID',
) );
// If there is more than 1 attachment in a gallery...

View File

@ -216,12 +216,15 @@ function twentythirteen_admin_header_style() {
* @since Twenty Thirteen 1.0
*/
function twentythirteen_admin_header_image() {
$style = 'color: #' . get_header_textcolor() . ';';
if ( ! display_header_text() ) {
$style = 'display: none;';
}
?>
<div id="headimg" style="background: url(<?php header_image(); ?>) no-repeat scroll top; background-size: 1600px auto;">
<?php $style = ' style="color:#' . get_header_textcolor() . ';"'; ?>
<div id="headimg" style="background: url(<?php echo esc_url( get_header_image() ); ?>) no-repeat scroll top; background-size: 1600px auto;">
<div class="home-link">
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="#" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
<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>
<h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
</div>
</div>
<?php }

View File

@ -20,7 +20,7 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<header class="archive-header">
<h1 class="archive-title"><?php printf( __( '%s Archives', 'twentythirteen' ), '<span>' . get_post_format_string( get_post_format() ) . '</span>' ); ?></h1>
<h1 class="archive-title"><?php printf( __( '%s Archives', 'twentythirteen' ), '<span>' . esc_html( get_post_format_string( get_post_format() ) ) . '</span>' ); ?></h1>
</header><!-- .archive-header -->
<?php /* The loop */ ?>

View File

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