diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php
index f9baf78d18..b08615f93d 100644
--- a/wp-admin/includes/dashboard.php
+++ b/wp-admin/includes/dashboard.php
@@ -181,12 +181,13 @@ function wp_dashboard_right_now() {
// Posts
$num = number_format_i18n( $num_posts->publish );
- if ( current_user_can( 'edit_posts' ) )
- $text = "$num";
- else
- $text = $num;
- echo '
' . $text . ' | ';
- echo '' . __ngettext( 'Post', 'Posts', intval($num_posts->publish) ) . ' | ';
+ $text = __ngettext( 'Post', 'Posts', intval($num_posts->publish) );
+ if ( current_user_can( 'edit_posts' ) ) {
+ $num = "$num";
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
/* TODO: Show status breakdown on hover
if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can
$post_type_texts[] = ''.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'';
@@ -206,58 +207,79 @@ function wp_dashboard_right_now() {
// Total Comments
$num = number_format_i18n($num_comm->total_comments);
- if ( current_user_can( 'moderate_comments' ) )
+ $text = __ngettext( 'Comment', 'Comments', $num_comm->total_comments );
+ if ( current_user_can( 'moderate_comments' ) ) {
$num = "$num";
- echo '';
- echo '';
+ $text = "$text";
+ }
+ echo '';
+ echo '';
echo '';
// Pages
$num = number_format_i18n( $num_pages->publish );
- if ( current_user_can( 'edit_pages' ) )
+ $text = __ngettext( 'Page', 'Pages', $num_pages->publish );
+ if ( current_user_can( 'edit_pages' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Page', 'Pages', $num_pages->publish ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
// Approved Comments
$num = number_format_i18n($num_comm->approved);
- if ( current_user_can( 'moderate_comments' ) )
+ $text = __ngettext( 'Approved', 'Approved', $num_comm->approved );
+ if ( current_user_can( 'moderate_comments' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Approved', 'Approved', $num_comm->approved ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
echo "
\n\t";
// Categories
$num = number_format_i18n( $num_cats );
- if ( current_user_can( 'manage_categories' ) )
+ $text = __ngettext( 'Category', 'Categories', $num_cats );
+ if ( current_user_can( 'manage_categories' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Category', 'Categories', $num_cats ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
// Pending Comments
$num = number_format_i18n($num_comm->moderated);
- if ( current_user_can( 'moderate_comments' ) )
+ $text = __ngettext( 'Pending', 'Pending', $num_comm->moderated );
+ if ( current_user_can( 'moderate_comments' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Pending', 'Pending', $num_comm->moderated ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
echo "
\n\t";
// Tags
$num = number_format_i18n( $num_tags );
- if ( current_user_can( 'manage_categories' ) )
+ $text = __ngettext( 'Tag', 'Tags', $num_tags );
+ if ( current_user_can( 'manage_categories' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Tag', 'Tags', $num_tags ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
// Spam Comments
$num = number_format_i18n($num_comm->spam);
- if ( current_user_can( 'moderate_comments' ) )
+ $text = __ngettext( 'Spam', 'Spam', $num_comm->spam );
+ if ( current_user_can( 'moderate_comments' ) ) {
$num = "$num";
- echo ''.$num.' | ';
- echo '' . __ngettext( 'Spam', 'Spam', $num_comm->spam ) . ' | ';
+ $text = "$text";
+ }
+ echo '' . $num . ' | ';
+ echo '' . $text . ' | ';
echo "
";
do_action('right_now_table_end');