Twenty Fifteen: Remove various unnecessary `esc_html()` calls and replace various unnecessary `esc_html_x()` calls with `_x()`.

Merges [30899], [30901], and [30905] into 4.1.

Props ocean90
Fixes #30724

Built from https://develop.svn.wordpress.org/branches/4.1@30926


git-svn-id: http://core.svn.wordpress.org/branches/4.1@30915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-12-16 20:52:21 +00:00
parent 395e007a29
commit ca16a486ec
1 changed files with 9 additions and 9 deletions

View File

@ -52,7 +52,7 @@ function twentyfifteen_entry_meta() {
$format = get_post_format();
if ( current_theme_supports( 'post-formats', $format ) ) {
printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
esc_url( get_post_format_link( $format ) ),
get_post_format_string( $format )
);
@ -67,13 +67,13 @@ function twentyfifteen_entry_meta() {
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
get_the_date(),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
get_the_modified_date()
);
printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
esc_url( get_permalink() ),
$time_string
);
@ -82,16 +82,16 @@ function twentyfifteen_entry_meta() {
if ( 'post' == get_post_type() ) {
if ( is_singular() || is_multi_author() ) {
printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
get_the_author()
);
}
$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
if ( $categories_list && twentyfifteen_categorized_blog() ) {
printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
$categories_list
);
}
@ -99,7 +99,7 @@ function twentyfifteen_entry_meta() {
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) );
if ( $tags_list ) {
printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
$tags_list
);
}
@ -110,7 +110,7 @@ function twentyfifteen_entry_meta() {
$metadata = wp_get_attachment_metadata();
printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
esc_url( wp_get_attachment_url() ),
$metadata['width'],
$metadata['height']