Skip to content

Commit

Permalink
Twenty Nineteen: Avoid nested comment author links in `TwentyNineteen…
Browse files Browse the repository at this point in the history
…_Walker_Comment::html5_comment()`.

Props iamdmitrymayorov, mukesh27.
Fixes #46291.

git-svn-id: https://develop.svn.wordpress.org/trunk@44771 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Feb 28, 2019
1 parent 3d246f9 commit 3574d43
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -33,10 +33,9 @@ protected function html5_comment( $comment, $depth, $args ) {
<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;
Expand Down Expand Up @@ -71,7 +70,7 @@ protected function html5_comment( $comment, $depth, $args ) {
),
)
),
'<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
'<b class="fn">' . $comment_author . '</b>'
);

if ( ! empty( $comment_author_url ) ) {
Expand Down

0 comments on commit 3574d43

Please sign in to comment.