mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-03 08:40:10 +00:00
Shows pending moderation comments in title and bold comment numbers with comments that need attention.
git-svn-id: https://develop.svn.wordpress.org/trunk@5821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -58,4 +58,11 @@ function get_comment_to_edit( $id ) {
|
||||
return $comment;
|
||||
}
|
||||
|
||||
function get_pending_comments_num( $post_id ) {
|
||||
global $wpdb;
|
||||
$post_id = (int) $post_id;
|
||||
$pending = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '0'" );
|
||||
return $pending;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user