From c98179fb8289abed4a0927210efd9fc6177b5825 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Nov 2015 23:37:29 +0000 Subject: [PATCH] Remove `` tag from translatable string in `the_author()`. Add translator commment. Props ramiy. See #34573. git-svn-id: https://develop.svn.wordpress.org/trunk@35545 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/author-template.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/author-template.php b/src/wp-includes/author-template.php index ad090354fd..54ad8cada1 100644 --- a/src/wp-includes/author-template.php +++ b/src/wp-includes/author-template.php @@ -56,12 +56,23 @@ function get_the_author($deprecated = '') { * @return string|null The author's display name, from get_the_author(). */ function the_author( $deprecated = '', $deprecated_echo = true ) { - if ( !empty( $deprecated ) ) + if ( ! empty( $deprecated ) ) { _deprecated_argument( __FUNCTION__, '2.1' ); - if ( $deprecated_echo !== true ) - _deprecated_argument( __FUNCTION__, '1.5', __('Use get_the_author() instead if you do not want the value echoed.') ); - if ( $deprecated_echo ) + } + + if ( true !== $deprecated_echo ) { + _deprecated_argument( __FUNCTION__, '1.5', + /* translators: %s: get_the_author() */ + sprintf( __( 'Use %s instead if you do not want the value echoed.' ), + 'get_the_author()' + ) + ); + } + + if ( $deprecated_echo ) { echo get_the_author(); + } + return get_the_author(); }