Show Pending Review posts on the dashboard. props link2caro for the idea. fixes #6290
git-svn-id: http://svn.automattic.com/wordpress/trunk@7389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ebfc602022
commit
4d6d4c39ea
|
@ -74,6 +74,12 @@ if ( $can_edit_posts && !empty($num_posts->future) ) {
|
||||||
$post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>';
|
$post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) {
|
||||||
|
$pending_text = sprintf( __ngettext( 'There is <a href="%1$s">%2$s post</a> pending your review.', 'There is <a href="%1$s">%2$s posts</a> 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 ) );
|
$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 ) );
|
$tags_text = sprintf( __ngettext( '%s tag', '%s tags', $num_tags ), number_format_i18n( $num_tags ) );
|
||||||
if ( current_user_can( 'manage_categories' ) ) {
|
if ( current_user_can( 'manage_categories' ) ) {
|
||||||
|
@ -84,7 +90,7 @@ if ( current_user_can( 'manage_categories' ) ) {
|
||||||
$post_type_text = implode(', ', $post_type_texts);
|
$post_type_text = implode(', ', $post_type_texts);
|
||||||
|
|
||||||
// There is always a category
|
// 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 );
|
$sentence = apply_filters( 'dashboard_count_sentence', $sentence, $post_type_text, $cats_text, $tags_text );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue