introduce WP_List_Table::comments_bubble(); revert to edit-comments.php?p=123. See #14579

git-svn-id: https://develop.svn.wordpress.org/trunk@15504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-08-18 16:30:27 +00:00
parent ad944bb822
commit 0a6cb83e18
3 changed files with 38 additions and 45 deletions
+27
View File
@@ -268,6 +268,33 @@ class WP_List_Table {
<?php
}
/** Display a comment count bubble
*
*
* @since 3.1.0
* @access protected
*
* @param int $post_id
* @param int $pending_comments
*/
function comments_bubble( $post_id, $pending_comments ) {
$pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
if ( $pending_comments )
echo '<strong>';
$link = "<a href='edit-comments.php?p=$post->ID' title='$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' ) )
);
if ( $pending_comments )
echo '</strong>';
}
/**
* Get the current page number
*