More consistent attribute escaping. Props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
843a66b867
commit
dd64f17ab7
|
@ -36,7 +36,7 @@
|
||||||
get_the_date( 'c' ),
|
get_the_date( 'c' ),
|
||||||
get_the_date(),
|
get_the_date(),
|
||||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||||
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
|
||||||
get_the_author()
|
get_the_author()
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
|
||||||
</div><!-- #author-avatar -->
|
</div><!-- #author-avatar -->
|
||||||
<div id="author-description">
|
<div id="author-description">
|
||||||
<h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
|
<h2><?php printf( __( 'About %s', 'twentyeleven' ), 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 esc_url( 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">
|
||||||
|
|
|
@ -567,8 +567,8 @@ function twentyeleven_posted_on() {
|
||||||
esc_attr( get_the_date( 'c' ) ),
|
esc_attr( get_the_date( 'c' ) ),
|
||||||
esc_html( get_the_date() ),
|
esc_html( get_the_date() ),
|
||||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||||
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
|
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
|
||||||
esc_html( get_the_author() )
|
get_the_author()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
endif;
|
endif;
|
||||||
|
@ -582,9 +582,8 @@ endif;
|
||||||
*/
|
*/
|
||||||
function twentyeleven_body_classes( $classes ) {
|
function twentyeleven_body_classes( $classes ) {
|
||||||
|
|
||||||
if ( ! is_multi_author() ) {
|
if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
|
||||||
$classes[] = 'single-author';
|
$classes[] = 'single-author';
|
||||||
}
|
|
||||||
|
|
||||||
if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
|
if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
|
||||||
$classes[] = 'singular';
|
$classes[] = 'singular';
|
||||||
|
|
|
@ -27,13 +27,14 @@ get_header(); ?>
|
||||||
<div class="entry-meta">
|
<div class="entry-meta">
|
||||||
<?php
|
<?php
|
||||||
$metadata = wp_get_attachment_metadata();
|
$metadata = wp_get_attachment_metadata();
|
||||||
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'twentyeleven' ),
|
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentyeleven' ),
|
||||||
esc_attr( get_the_time() ),
|
esc_attr( get_the_time() ),
|
||||||
get_the_date(),
|
get_the_date(),
|
||||||
esc_url( wp_get_attachment_url() ),
|
esc_url( wp_get_attachment_url() ),
|
||||||
$metadata['width'],
|
$metadata['width'],
|
||||||
$metadata['height'],
|
$metadata['height'],
|
||||||
esc_url( get_permalink( $post->post_parent ) ),
|
esc_url( get_permalink( $post->post_parent ) ),
|
||||||
|
esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
|
||||||
get_the_title( $post->post_parent )
|
get_the_title( $post->post_parent )
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
@ -70,7 +71,7 @@ get_header(); ?>
|
||||||
$next_attachment_url = wp_get_attachment_url();
|
$next_attachment_url = wp_get_attachment_url();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
|
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
|
||||||
$attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
|
$attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
|
||||||
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
|
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
|
||||||
?></a>
|
?></a>
|
||||||
|
|
|
@ -4,7 +4,7 @@ Theme URI: http://wordpress.org/extend/themes/twentyeleven
|
||||||
Author: the WordPress team
|
Author: the WordPress team
|
||||||
Author URI: http://wordpress.org/
|
Author URI: http://wordpress.org/
|
||||||
Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
|
Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
|
||||||
Version: 1.2
|
Version: 1.3
|
||||||
License: GNU General Public License
|
License: GNU General Public License
|
||||||
License URI: license.txt
|
License URI: license.txt
|
||||||
Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
|
||||||
|
|
|
@ -473,7 +473,7 @@ function twentyten_posted_on() {
|
||||||
),
|
),
|
||||||
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
|
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
|
||||||
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
|
esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
|
||||||
get_the_author()
|
get_the_author()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
|
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<?php if ( ! empty( $post->post_parent ) ) : ?>
|
<?php if ( ! empty( $post->post_parent ) ) : ?>
|
||||||
<p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
|
<p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery"><?php
|
||||||
/* translators: %s - title of parent post */
|
/* translators: %s - title of parent post */
|
||||||
printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
|
printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
|
||||||
?></a></p>
|
?></a></p>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
'meta-prep meta-prep-author',
|
'meta-prep meta-prep-author',
|
||||||
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
|
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
|
||||||
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
get_author_posts_url( get_the_author_meta( 'ID' ) ),
|
||||||
sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
|
esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
|
||||||
get_the_author()
|
get_the_author()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
$next_attachment_url = wp_get_attachment_url();
|
$next_attachment_url = wp_get_attachment_url();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
|
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
|
||||||
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
|
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
|
||||||
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
|
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
|
||||||
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
|
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
<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 wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
|
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo 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>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
|
||||||
</div><!-- #author-avatar -->
|
</div><!-- #author-avatar -->
|
||||||
<div id="author-description">
|
<div id="author-description">
|
||||||
<h2><?php printf( esc_attr__( '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 get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">
|
||||||
|
|
|
@ -3,7 +3,7 @@ Theme Name: Twenty Ten
|
||||||
Theme URI: http://wordpress.org/
|
Theme URI: http://wordpress.org/
|
||||||
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
||||||
Author: the WordPress team
|
Author: the WordPress team
|
||||||
Version: 1.2
|
Version: 1.3
|
||||||
License: GNU General Public License
|
License: GNU General Public License
|
||||||
License URI: license.txt
|
License URI: license.txt
|
||||||
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
|
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
|
||||||
|
|
Loading…
Reference in New Issue