From cf9f85dc8121a359d550ffa3b735fb48859eee88 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 24 Apr 2008 11:45:39 +0000 Subject: Merged with WP 2.5, revision 7806 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/edit-post-rows.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'wp-admin/edit-post-rows.php') diff --git a/wp-admin/edit-post-rows.php b/wp-admin/edit-post-rows.php index 582db31..0906b68 100644 --- a/wp-admin/edit-post-rows.php +++ b/wp-admin/edit-post-rows.php @@ -22,6 +22,14 @@ if ( have_posts() ) { $bgcolor = ''; add_filter('the_title','wp_specialchars'); + +// Create array of post IDs. +$post_ids = array(); +foreach ( $wp_query->posts as $a_post ) + $post_ids[] = $a_post->ID; + +$comment_pending_count = get_pending_comments_num($post_ids); + while (have_posts()) : the_post(); $class = 'alternate' == $class ? '' : 'alternate'; global $current_user; @@ -67,7 +75,7 @@ foreach($posts_columns as $column_name=>$column_display_name) { } } ?> - + $column_display_name) { ?>
ID ); + $left = isset($comment_pending_count) ? $comment_pending_count[$post->ID] : 0; $pending_phrase = sprintf( __('%s pending'), number_format( $left ) ); if ( $left ) echo ''; -- cgit