diff --git a/wp-admin/index.php b/wp-admin/index.php index f8abbc2d84..8f9f8ac828 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -32,14 +32,15 @@ foreach ($rss->items as $item ) { get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5") ) : +$comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5"); +$numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'"); + +if ( $comments || $numcomments ) : ?>

»

-get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) : -?> +

»