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: https://develop.svn.wordpress.org/trunk@17475 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
90a2c2c945
commit
6970857abf
@ -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
Block a user