Use get_comments_number() in comments_bubble() method. Removes chance of sprintf arguments error due to percent encoding in URLs and kills unnecessary translations. Escape translations into attributes. esc_url on admin_url. fixes #16611 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
94c9d20a33
commit
1445d78cf0
|
@ -420,13 +420,9 @@ class WP_List_Table {
|
|||
if ( $pending_comments )
|
||||
echo '<strong>';
|
||||
|
||||
$link = "<a href='" . add_query_arg( 'p', $post_id, admin_url('edit-comments.php') ) . "' title='$pending_phrase' class='post-com-count'><span class='comment-count'>%s</span></a>";
|
||||
$link = "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>%s</span></a>";
|
||||
|
||||
comments_number(
|
||||
sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ),
|
||||
sprintf( $link, /* translators: comment count link */ _x( '1', 'comment count' ) ),
|
||||
sprintf( $link, /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) )
|
||||
);
|
||||
printf( $link, number_format_i18n( get_comments_number() ) );
|
||||
|
||||
if ( $pending_comments )
|
||||
echo '</strong>';
|
||||
|
|
Loading…
Reference in New Issue