我想破解默认值Recent Comments widget也可以显示评论者的化身。
如果我直接在default-widgets.php
if ( $comments ) {
foreach ( (array) $comments as $comment) {
$output .= \'<li class="recentcomments">\' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x(\'%1$s on %2$s\', \'widgets\'), get_comment_author_link(), \'<a href="\' . esc_url( get_comment_link($comment->comment_ID) ) . \'">\' . get_the_title($comment->comment_post_ID) . \'</a>\') . get_avatar($comment->user_id , 20) . \'</li>\';
}
}
但我不喜欢更改核心文件,我更喜欢用ortodox的方式来实现它。我该怎么做?