This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Move Screen Reader Text Span Inside the Translation String for Edit Link

  • Loading branch information...
iamtakashi committed Nov 19, 2015
1 parent 4d57bac commit cdee6023358f1e79281a9ddbb81a561f14d00779
View
@@ -81,8 +81,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<span class="edit-link">',
'</span>'
@@ -34,8 +34,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<footer class="entry-footer"><span class="edit-link">',
'</span></footer><!-- .entry-footer -->'
@@ -25,8 +25,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">"', '"</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<span class="edit-link">',
'</span>'
@@ -40,8 +40,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<footer class="entry-footer"><span class="edit-link">',
'</span></footer><!-- .entry-footer -->'
@@ -42,8 +42,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<span class="edit-link">',
'</span>'
@@ -25,8 +25,8 @@
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
- __( 'Continue reading %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">"', '"</span>', false )
+ __( 'Continue reading<span class="screen-reader-text"> %s</span>', 'twentysixteen' ),
+ the_title( '', '', false )
) );
wp_link_pages( array(
@@ -46,8 +46,8 @@
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
- __( 'Edit %s', 'twentysixteen' ),
- the_title( '<span class="screen-reader-text">', '</span>', false )
+ __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
+ the_title( '', '', false )
),
'<span class="edit-link">',
'</span>'

4 comments on commit cdee602

@mtomas7

This comment has been minimized.

Show comment
Hide comment
@mtomas7

mtomas7 Nov 24, 2015

@iamtakashi Hi, I'm using default themes to learn and in this particular instance I don't know for sure what was the benefit of this change as in Underscores it is the old way. Could you explain it in few words?

I could guess that it allows translator to alter the class name if there is a need?

Thank you!

@iamtakashi Hi, I'm using default themes to learn and in this particular instance I don't know for sure what was the benefit of this change as in Underscores it is the old way. Could you explain it in few words?

I could guess that it allows translator to alter the class name if there is a need?

Thank you!

@DannyCooper

This comment has been minimized.

Show comment
Hide comment
@DannyCooper

DannyCooper Oct 29, 2016

@mtomas7 @iamtakashi I'm also interested in finding out why this was done this way for learning purposes.

@mtomas7 @iamtakashi I'm also interested in finding out why this was done this way for learning purposes.

@mtomas7

This comment has been minimized.

Show comment
Hide comment

@DannyCooper please see: #383

@DannyCooper

This comment has been minimized.

Show comment
Hide comment
@DannyCooper

DannyCooper Nov 2, 2016

Thank you @mtomas7, I appreciate your response.

Thank you @mtomas7, I appreciate your response.

Please sign in to comment.