Make WordPress Core

Changeset 52154


Ignore:
Timestamp:
11/14/2021 05:59:04 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r52029 r52154  
    17371737            'belowelement'   => $args['add_below'] . '-' . $comment->comment_ID,
    17381738            'respondelement' => $args['respond_id'],
    1739             'replyto'        => sprintf( $args['reply_to_text'], $comment->comment_author ),
     1739            'replyto'        => sprintf( $args['reply_to_text'], get_comment_author( $comment ) ),
    17401740        );
    17411741
     
    17611761            ) . '#' . $args['respond_id'],
    17621762            $data_attribute_string,
    1763             esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ),
     1763            esc_attr( sprintf( $args['reply_to_text'], get_comment_author( $comment ) ) ),
    17641764            $args['reply_text']
    17651765        );
Note: See TracChangeset for help on using the changeset viewer.