Twenty Eleven: fix escaping and minor code style issues. See #29127.
Built from https://develop.svn.wordpress.org/trunk@31265 git-svn-id: http://core.svn.wordpress.org/trunk@31246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dc0f9e0079
commit
dcf53d5bbb
|
@ -26,7 +26,7 @@ get_header(); ?>
|
|||
?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<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>
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<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>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<?php if ( comments_open() && ! post_password_required() ) : ?>
|
||||
<div class="comments-link">
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
|
|
@ -332,13 +332,13 @@ function twentyeleven_admin_header_image() { ?>
|
|||
<?php
|
||||
$color = get_header_textcolor();
|
||||
$image = get_header_image();
|
||||
if ( $color && $color != 'blank' )
|
||||
$style = ' style="color:#' . $color . '"';
|
||||
else
|
||||
$style = ' style="display:none"';
|
||||
$style = 'display: none;';
|
||||
if ( $color && $color != 'blank' ) {
|
||||
$style = 'color: #' . $color . ';';
|
||||
}
|
||||
?>
|
||||
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
|
||||
<h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div>
|
||||
<?php if ( $image ) : ?>
|
||||
<img src="<?php echo esc_url( $image ); ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
|
@ -446,7 +446,7 @@ function twentyeleven_widgets_init() {
|
|||
'name' => __( 'Main Sidebar', 'twentyeleven' ),
|
||||
'id' => 'sidebar-1',
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
@ -456,7 +456,7 @@ function twentyeleven_widgets_init() {
|
|||
'id' => 'sidebar-2',
|
||||
'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
@ -466,7 +466,7 @@ function twentyeleven_widgets_init() {
|
|||
'id' => 'sidebar-3',
|
||||
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
@ -476,7 +476,7 @@ function twentyeleven_widgets_init() {
|
|||
'id' => 'sidebar-4',
|
||||
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
@ -486,7 +486,7 @@ function twentyeleven_widgets_init() {
|
|||
'id' => 'sidebar-5',
|
||||
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => "</aside>",
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
|
@ -581,7 +581,7 @@ function twentyeleven_footer_sidebar_class() {
|
|||
}
|
||||
|
||||
if ( $class )
|
||||
echo 'class="' . $class . '"';
|
||||
echo 'class="' . esc_attr( $class ) . '"';
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'twentyeleven_comment' ) ) :
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// Add a page number if necessary:
|
||||
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
|
||||
echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
|
||||
echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) );
|
||||
|
||||
?></title>
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
||||
|
@ -111,7 +111,7 @@
|
|||
$header_image_height = HEADER_IMAGE_HEIGHT;
|
||||
}
|
||||
?>
|
||||
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
|
||||
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
|
||||
<?php endif; // end check for featured image or standard header ?>
|
||||
</a>
|
||||
<?php endif; // end check for removed header image ?>
|
||||
|
|
|
@ -277,7 +277,7 @@ function twentyeleven_settings_field_color_scheme() {
|
|||
<input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" />
|
||||
<span>
|
||||
<img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" />
|
||||
<?php echo $scheme['label']; ?>
|
||||
<?php echo esc_html( $scheme['label'] ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -316,7 +316,7 @@ function twentyeleven_settings_field_layout() {
|
|||
<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> />
|
||||
<span>
|
||||
<img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" />
|
||||
<?php echo $layout['label']; ?>
|
||||
<?php echo esc_html( $layout['label'] ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -53,17 +53,17 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
|||
extract( $args, EXTR_SKIP );
|
||||
|
||||
/** This filter is documented in wp-includes/default-widgets.php */
|
||||
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base);
|
||||
$args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base );
|
||||
|
||||
if ( ! isset( $instance['number'] ) )
|
||||
$instance['number'] = '10';
|
||||
|
||||
if ( ! $number = absint( $instance['number'] ) )
|
||||
$number = 10;
|
||||
if ( ! $args['number'] = absint( $instance['number'] ) )
|
||||
$args['number'] = 10;
|
||||
|
||||
$ephemera_args = array(
|
||||
'order' => 'DESC',
|
||||
'posts_per_page' => $number,
|
||||
'posts_per_page' => $args['number'],
|
||||
'no_found_rows' => true,
|
||||
'post_status' => 'publish',
|
||||
'post__not_in' => get_option( 'sticky_posts' ),
|
||||
|
@ -79,10 +79,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
|||
$ephemera = new WP_Query( $ephemera_args );
|
||||
|
||||
if ( $ephemera->have_posts() ) :
|
||||
echo $before_widget;
|
||||
echo $before_title;
|
||||
echo $title; // Can set this with a widget option, or omit altogether
|
||||
echo $after_title;
|
||||
echo $args['before_widget'];
|
||||
echo $args['before_title'];
|
||||
echo $args['title'];
|
||||
echo $args['after_title'];
|
||||
?>
|
||||
<ol>
|
||||
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
|
||||
|
@ -111,7 +111,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
|
|||
</ol>
|
||||
<?php
|
||||
|
||||
echo $after_widget;
|
||||
echo $args['after_widget'];
|
||||
|
||||
// Reset the post globals as this query will have stomped on it
|
||||
wp_reset_postdata();
|
||||
|
|
|
@ -105,7 +105,7 @@ get_header(); ?>
|
|||
}
|
||||
?>
|
||||
|
||||
<section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>">
|
||||
<section class="featured-post <?php echo esc_attr( $feature_class ); ?>" id="featured-post-<?php echo esc_attr( $counter_slider ); ?>">
|
||||
|
||||
<?php
|
||||
/*
|
||||
|
@ -148,7 +148,7 @@ get_header(); ?>
|
|||
else
|
||||
$class = '';
|
||||
?>
|
||||
<li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php echo $class; ?>></a></li>
|
||||
<li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31264';
|
||||
$wp_version = '4.2-alpha-31265';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue