After [33961], pass $comment to get_comment_link() where possible to avoid extra cache/db lookups.
See #33638. Built from https://develop.svn.wordpress.org/trunk@34042 git-svn-id: http://core.svn.wordpress.org/trunk@34010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -111,7 +111,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
|
||||
/* 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 ) . '</span>',
|
||||
'<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
|
||||
'<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
|
||||
);
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user