Comments: Use `get_comment_author()` to retrieve the comment author name in `get_comment_reply_link()`.

This ensures that the `get_comment_author` filter is applied to the comment author name as expected.

Follow-up to [29822], [47506].

Props mjulian7, audrasjb, chaion07, hellofromTonya, SergeyBiryukov.
Fixes #53678.
Built from https://develop.svn.wordpress.org/trunk@52154


git-svn-id: http://core.svn.wordpress.org/trunk@51746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-11-14 18:01:04 +00:00
parent 718adc4c9d
commit 17ae1d0c7f
2 changed files with 3 additions and 3 deletions

View File

@ -1736,7 +1736,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
'postid' => $post->ID, 'postid' => $post->ID,
'belowelement' => $args['add_below'] . '-' . $comment->comment_ID, 'belowelement' => $args['add_below'] . '-' . $comment->comment_ID,
'respondelement' => $args['respond_id'], 'respondelement' => $args['respond_id'],
'replyto' => sprintf( $args['reply_to_text'], $comment->comment_author ), 'replyto' => sprintf( $args['reply_to_text'], get_comment_author( $comment ) ),
); );
$data_attribute_string = ''; $data_attribute_string = '';
@ -1760,7 +1760,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
) )
) . '#' . $args['respond_id'], ) . '#' . $args['respond_id'],
$data_attribute_string, $data_attribute_string,
esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ), esc_attr( sprintf( $args['reply_to_text'], get_comment_author( $comment ) ) ),
$args['reply_text'] $args['reply_text']
); );
} }

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.9-alpha-52153'; $wp_version = '5.9-alpha-52154';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.