我有一个使用服装主题的 WordPress 博客,我想做的是更改博客文章下方每条评论末尾的回复文本,以便其中包含评论发布者的姓名。
例如,如果评论用户的名字为“max”,则回复按钮会显示“回复 max”,而不仅仅是回复。
我明白了
<?php
$author = get_comment_author( $comment_ID );
comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply to '.$author.'<span>↑</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );
?>