Use wp_count_comments() in wp.getCommentCount. Props josephscott. fixes #6941

git-svn-id: https://develop.svn.wordpress.org/trunk@7914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-05-09 16:02:44 +00:00
parent 1c4f5de9a1
commit 4f11ea671a
1 changed files with 7 additions and 1 deletions

View File

@ -698,7 +698,13 @@ class wp_xmlrpc_server extends IXR_Server {
do_action('xmlrpc_call', 'wp.getCommentCount');
return get_comment_count( $post_id );
$count = wp_count_comments( $post_id );
return array(
"approved" => $count->approved,
"awaiting_moderation" => $count->moderated,
"spam" => $count->spam,
"total_comments" => $count->total_comments
);
}