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

props DrewAPicture, dannydehaan, 5um17.
fixes #27944.

git-svn-id: https://develop.svn.wordpress.org/trunk@29241 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-07-19 02:43:27 +00:00
parent 0121e36154
commit c62cd97555
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>';