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 the 3.1 branch.
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
68b6a2813d
commit
ff64d344f3
|
@ -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