From 50271a97d59ccadd80fffd32c5a6280800cd7808 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Wed, 12 Nov 2014 17:21:21 +0000 Subject: [PATCH] Twenty Fifteen: clean up sprintf from template tags and use the correct escaping for twentyfifteen template tags. Props aprea, obenland, fixes #30319 Built from https://develop.svn.wordpress.org/trunk@30312 git-svn-id: http://core.svn.wordpress.org/trunk@30311 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../twentyfifteen/inc/template-tags.php | 20 +++++++++---------- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-content/themes/twentyfifteen/inc/template-tags.php b/wp-content/themes/twentyfifteen/inc/template-tags.php index b06bc71b1e..99d65ecf48 100644 --- a/wp-content/themes/twentyfifteen/inc/template-tags.php +++ b/wp-content/themes/twentyfifteen/inc/template-tags.php @@ -72,8 +72,8 @@ function twentyfifteen_entry_meta() { esc_html( get_the_modified_date() ) ); - printf( '%1$s%3$s', - sprintf( _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ) ), + printf( '%1$s%3$s', + esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ), esc_url( get_permalink() ), $time_string ); @@ -81,8 +81,8 @@ function twentyfifteen_entry_meta() { if ( 'post' == get_post_type() ) { if ( is_singular() || is_multi_author() ) { - printf( '%1$s%3$s', - sprintf( _x( 'Author', 'Used before post author name.', 'twentyfifteen' ) ), + printf( '%1$s%3$s', + esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ); @@ -90,16 +90,16 @@ function twentyfifteen_entry_meta() { $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( '%1$s%2$s', - sprintf( _x( 'Categories', 'Used before category names.', 'twentyfifteen' ) ), + printf( '%1$s%2$s', + esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ), $categories_list ); } $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfifteen' ) ); if ( $tags_list ) { - printf( '%1$s%2$s', - sprintf( _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ) ), + printf( '%1$s%2$s', + esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ), $tags_list ); } @@ -109,8 +109,8 @@ function twentyfifteen_entry_meta() { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); - printf( '%1$s%3$s × %4$s', - sprintf( _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ) ), + printf( '%1$s%3$s × %4$s', + esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ), esc_url( wp_get_attachment_url() ), $metadata['width'], $metadata['height'] diff --git a/wp-includes/version.php b/wp-includes/version.php index f7c3d694a7..3d40fb2930 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30311'; +$wp_version = '4.1-alpha-30312'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.