Make WordPress Core


Ignore:
Timestamp:
02/22/2011 04:24:20 AM (15 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-list-table.php

    r17435 r17475  
    421421                        echo '<strong>';
    422422
    423                 $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>";
    424 
    425                 comments_number(
    426                         sprintf( $link, /* translators: comment count link */ _x( '0', 'comment count' ) ),
    427                         sprintf( $link, /* translators: comment count link */ _x( '1', 'comment count' ) ),
    428                         sprintf( $link, /* translators: comment count link: % will be substituted by comment count */ _x( '%', 'comment count' ) )
    429                 );
     423                $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>";
     424
     425                printf( $link, number_format_i18n( get_comments_number() ) );
    430426
    431427                if ( $pending_comments )
Note: See TracChangeset for help on using the changeset viewer.