From 0a0e5c631f0e481af7cb56efd801eb982164b4f6 Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Thu, 2 Jul 2015 17:37:30 -0400 Subject: [PATCH] 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 --- inc/template-tags.php | 5 +++-- template-parts/content-page.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index e9ab284..6beb464 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -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( '"', '"', false ), array( 'span' => array( 'class' => array() ) ) ) + /* translators: %s: Name of current post */ + esc_html__( 'Edit %s', '_s' ), + the_title( '"', '"', false ) ), '', '' diff --git a/template-parts/content-page.php b/template-parts/content-page.php index e837d96..d70c9d5 100644 --- a/template-parts/content-page.php +++ b/template-parts/content-page.php @@ -26,8 +26,9 @@ "', '"', false ), array( 'span' => array( 'class' => array() ) ) ) + /* translators: %s: Name of current post */ + esc_html__( 'Edit %s', '_s' ), + the_title( '"', '"', false ) ), '', ''