After [33961], pass $comment to get_comment_author_link() where possible to avoid extra cache/db lookups.

See #33638.


git-svn-id: https://develop.svn.wordpress.org/trunk@34039 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-09-11 06:04:22 +00:00
parent 4cd30ede79
commit db702bc3ea
6 changed files with 8 additions and 8 deletions
@@ -110,7 +110,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
$output .= '<li class="recentcomments">';
/* translators: comments widget: 1: comment author, 2: post link */
$output .= sprintf( _x( '%1$s on %2$s', 'widgets' ),
'<span class="comment-author-link">' . get_comment_author_link( $comment->comment_ID ) . '</span>',
'<span class="comment-author-link">' . get_comment_author_link( $comment ) . '</span>',
'<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
);
$output .= '</li>';