Add post title to `edit_post_link`

* Use `__()` instead of `_x()`
* Add translator comment, remove context modifier.
* Remove escaping on `the_title()`; it's trusted data.

Resolves: #774
This commit is contained in:
David A. Kennedy 2015-07-02 17:37:30 -04:00
parent c60811bf94
commit 0a0e5c631f
2 changed files with 6 additions and 4 deletions

View File

@ -125,8 +125,9 @@ function _s_entry_footer() {
edit_post_link(
sprintf(
esc_html_x( 'Edit %s', 'name of current post', '_s' ),
wp_kses( the_title( '<span class="screen-reader-text">"', '"</span>', false ), array( 'span' => array( 'class' => array() ) ) )
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', '_s' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'

View File

@ -26,8 +26,9 @@
<?php
edit_post_link(
sprintf(
esc_html_x( 'Edit %s', 'name of current post', '_s' ),
wp_kses( the_title( '<span class="screen-reader-text">"', '"</span>', false ), array( 'span' => array( 'class' => array() ) ) )
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', '_s' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link">',
'</span>'