diff --git a/wp-admin/index.php b/wp-admin/index.php index 92702e329f..53c4ddf9f6 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -98,21 +98,16 @@ foreach ($scheduled as $post) {

get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); -if (0 < $numposts) $numposts = number_format($numposts); +$numposts = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'"); +$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); +$numcats = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -$numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); -if (0 < $numcomms) $numcomms = number_format($numcomms); - -$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); -if (0 < $numcats) $numcats = number_format($numcats); +$post_str = sprintf(__ngettext('%1$s post', '%1$s posts', $numposts), number_format($numposts), 'edit.php'); +$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), number_format($numcomms), 'edit-comments.php'); +$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), number_format($numcats), 'categories.php'); ?> -

post', '%1$s posts', $numposts), $numposts, 'edit.php'); -$comm_str = sprintf(__ngettext('%1$s comment', '%1$s comments', $numcomms), $numcomms, 'edit-comments.php'); -$cat_str = sprintf(__ngettext('%1$s category', '%1$s categories', $numcats), $numcats, 'categories.php'); -printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?>

+