summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/content-options/blog-display.php')
-rw-r--r--plugins/jetpack/modules/theme-tools/content-options/blog-display.php28
1 files changed, 21 insertions, 7 deletions
diff --git a/plugins/jetpack/modules/theme-tools/content-options/blog-display.php b/plugins/jetpack/modules/theme-tools/content-options/blog-display.php
index 78b88418..d37b6255 100644
--- a/plugins/jetpack/modules/theme-tools/content-options/blog-display.php
+++ b/plugins/jetpack/modules/theme-tools/content-options/blog-display.php
@@ -47,7 +47,7 @@ function jetpack_blog_display_custom_excerpt( $content ) {
* enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
* Do not translate into your own language.
*/
- if ( strpos( _x( 'words', 'Word count type. Do not translate!' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
+ if ( strpos( _x( 'words', 'Word count type. Do not translate!', 'jetpack' ), 'characters' ) === 0 && preg_match( '/^utf\-?8$/i', get_option( 'blog_charset' ) ) ) {
$text = trim( preg_replace( "/[\n\r\t ]+/", ' ', $text ), ' ' );
preg_match_all( '/./u', $text, $words );
$words = array_slice( $words[0], 0, $excerpt_length + 1 );
@@ -91,9 +91,16 @@ function jetpack_the_excerpt_to_the_content( $content ) {
if ( is_home() || is_archive() ) {
ob_start();
the_content( sprintf(
- /* translators: %s: Name of current post. */
- wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'jetpack' ), array( 'span' => array( 'class' => array() ) ) ),
- the_title( '<span class="screen-reader-text">"', '"</span>', false )
+ wp_kses(
+ /* translators: %s: Name of current post. Only visible to screen readers */
+ __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'jetpack' ),
+ array(
+ 'span' => array(
+ 'class' => array(),
+ ),
+ )
+ ),
+ get_the_title()
) );
$content = ob_get_clean();
}
@@ -126,9 +133,16 @@ function jetpack_the_excerpt_customizer( $excerpt ) {
if ( is_home() || is_archive() ) {
ob_start();
the_content( sprintf(
- /* translators: %s: Name of current post. */
- wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'jetpack' ), array( 'span' => array( 'class' => array() ) ) ),
- the_title( '<span class="screen-reader-text">"', '"</span>', false )
+ wp_kses(
+ /* translators: %s: Name of current post. Only visible to screen readers */
+ __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'jetpack' ),
+ array(
+ 'span' => array(
+ 'class' => array(),
+ ),
+ )
+ ),
+ get_the_title()
) );
$content = ob_get_clean();
}