Twenty Nineteen: Avoid nested comment author links in `TwentyNineteen_Walker_Comment::html5_comment()`.

Props iamdmitrymayorov, mukesh27.
Fixes #46291.

git-svn-id: https://develop.svn.wordpress.org/trunk@44771 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-02-28 01:54:14 +00:00
parent 3d246f985a
commit 3574d43d28
1 changed files with 4 additions and 5 deletions

View File

@ -33,10 +33,9 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
@ -71,7 +70,7 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
),
)
),
'<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
'<b class="fn">' . $comment_author . '</b>'
);
if ( ! empty( $comment_author_url ) ) {