Show comments in moderation even if there are no new ones. Fixes #1473
git-svn-id: http://svn.automattic.com/wordpress/trunk@3216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2fdc11a1d2
commit
5bb35ba138
|
@ -32,14 +32,15 @@ foreach ($rss->items as $item ) {
|
|||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( $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") ) :
|
||||
$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 ) :
|
||||
?>
|
||||
<div>
|
||||
<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">»</a></h3>
|
||||
|
||||
<?php
|
||||
if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :
|
||||
?>
|
||||
<?php if ( $numcomments ) : ?>
|
||||
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue