Add a class for get_comment_author_link() in Recent Comments widget.

props DrewAPicture, dannydehaan, 5um17.
fixes #27944.
Built from https://develop.svn.wordpress.org/trunk@29241


git-svn-id: http://core.svn.wordpress.org/trunk@29025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-07-19 02:44:14 +00:00
parent 440be3565d
commit fdd0756e5a
1 changed files with 7 additions and 1 deletions

View File

@ -871,7 +871,13 @@ class WP_Widget_Recent_Comments extends WP_Widget {
_prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
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>') . '</li>';
$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() . '</span>',
'<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
);
$output .= '</li>';
}
}
$output .= '</ul>';