From 3ecc06df8f322decfb1bf7b267a8e827b375a665 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Tue, 18 Mar 2008 22:49:41 +0000 Subject: [PATCH] Show Pending Review posts on the dashboard. props link2caro for the idea. fixes #6290 git-svn-id: https://develop.svn.wordpress.org/trunk@7389 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/index.php b/wp-admin/index.php index d1e5cdf543..4d70b4fe60 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -74,6 +74,12 @@ if ( $can_edit_posts && !empty($num_posts->future) ) { $post_type_texts[] = ''.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).''; } +if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { + $pending_text = sprintf( __ngettext( 'There is %2$s post pending your review.', 'There is %2$s posts pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); +} else { + $pending_text = ''; +} + $cats_text = sprintf( __ngettext( '%s category', '%s categories', $num_cats ), number_format_i18n( $num_cats ) ); $tags_text = sprintf( __ngettext( '%s tag', '%s tags', $num_tags ), number_format_i18n( $num_tags ) ); if ( current_user_can( 'manage_categories' ) ) { @@ -84,7 +90,7 @@ if ( current_user_can( 'manage_categories' ) ) { $post_type_text = implode(', ', $post_type_texts); // There is always a category -$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s.' ), $post_type_text, $cats_text, $tags_text ); +$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s. %4$s' ), $post_type_text, $cats_text, $tags_text, $pending_text ); $sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text ); ?>