- */
-
- // Total Comments
- $num = number_format_i18n($num_comm->total_comments);
- $text = _n( 'Comment', 'Comments', $num_comm->total_comments );
- if ( current_user_can( 'moderate_comments' ) ) {
- $num = "<a href='edit-comments.php'>$num</a>";
- $text = "<a href='edit-comments.php'>$text</a>";
- }
- echo '<td class="b b-comments">' . $num . '</td>';
- echo '<td class="last t comments">' . $text . '</td>';
-
- echo '</tr><tr>';
-
- // Pages
- $num = number_format_i18n( $num_pages->publish );
- $text = _n( 'Page', 'Pages', $num_pages->publish );
- if ( current_user_can( 'edit_pages' ) ) {
- $num = "<a href='edit-pages.php'>$num</a>";
- $text = "<a href='edit-pages.php'>$text</a>";
- }
- echo '<td class="first b b_pages">' . $num . '</td>';
- echo '<td class="t pages">' . $text . '</td>';
-
- // Approved Comments
- $num = number_format_i18n($num_comm->approved);
- $text = _nc( 'Approved|Right Now', 'Approved', $num_comm->approved );
- if ( current_user_can( 'moderate_comments' ) ) {
- $num = "<a href='edit-comments.php?comment_status=approved'>$num</a>";
- $text = "<a class='approved' href='edit-comments.php?comment_status=approved'>$text</a>";
- }
- echo '<td class="b b_approved">' . $num . '</td>';
- echo '<td class="last t">' . $text . '</td>';
-
- echo "</tr>\n\t<tr>";
-
- // Categories
- $num = number_format_i18n( $num_cats );
- $text = _n( 'Category', 'Categories', $num_cats );
- if ( current_user_can( 'manage_categories' ) ) {
- $num = "<a href='categories.php'>$num</a>";
- $text = "<a href='categories.php'>$text</a>";
- }
- echo '<td class="first b b-cats">' . $num . '</td>';
- echo '<td class="t cats">' . $text . '</td>';
-
- // Pending Comments
- $num = number_format_i18n($num_comm->moderated);
- $text = _n( 'Pending', 'Pending', $num_comm->moderated );
- if ( current_user_can( 'moderate_comments' ) ) {
- $num = "<a href='edit-comments.php?comment_status=moderated'><span class='pending-count'>$num</span></a>";
- $text = "<a class='waiting' href='edit-comments.php?comment_status=moderated'>$text</a>";
- }
- echo '<td class="b b-waiting">' . $num . '</td>';
- echo '<td class="last t">' . $text . '</td>';
-
- echo "</tr>\n\t<tr>";
-
- // Tags
- $num = number_format_i18n( $num_tags );
- $text = _n( 'Tag', 'Tags', $num_tags );
- if ( current_user_can( 'manage_categories' ) ) {
- $num = "<a href='edit-tags.php'>$num</a>";
- $text = "<a href='edit-tags.php'>$text</a>";
- }
- echo '<td class="first b b-tags">' . $num . '</td>';
- echo '<td class="t tags">' . $text . '</td>';
-
- // Spam Comments
- $num = number_format_i18n($num_comm->spam);
- $text = _n( 'Spam', 'Spam', $num_comm->spam );
- if ( current_user_can( 'moderate_comments' ) ) {
- $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>";
- $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>";
- }
- echo '<td class="b b-spam">' . $num . '</td>';
- echo '<td class="last t">' . $text . '</td>';
-
- echo "</tr>";
- do_action('right_now_table_end');
- echo "\n\t</table>\n\t</div>";
-
- echo "\n\t".'<div class="versions">';
- $ct = current_theme_info();
-
- echo "\n\t<p>";
- if ( !empty($wp_registered_sidebars) ) {
- $sidebars_widgets = wp_get_sidebars_widgets();
- $num_widgets = 0;
- foreach ( (array) $sidebars_widgets as $k => $v ) {
- if ( 'wp_inactive_widgets' == $k )
- continue;
- if ( is_array($v) )
- $num_widgets = $num_widgets + count($v);
+ // Comments
+ $num_comm = wp_count_comments();
+ if ( $num_comm && $num_comm->approved ) {
+ $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
+ ?>
+ <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
+ <?php
+ if ( $num_comm->moderated ) {
+ /* translators: Number of comments in moderation */
+ $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) );
+ ?>
+ <li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated"><?php echo $text; ?></a></li>
+ <?php