Changeset 7914

Show
Ignore:
Timestamp:
05/09/08 16:02:44 (2 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r7912 r7914  
    699699        do_action('xmlrpc_call', 'wp.getCommentCount'); 
    700700 
    701         return get_comment_count( $post_id ); 
     701        $count = wp_count_comments( $post_id ); 
     702        return array( 
     703            "approved" => $count->approved, 
     704            "awaiting_moderation" => $count->moderated, 
     705            "spam" => $count->spam, 
     706            "total_comments" => $count->total_comments 
     707        ); 
    702708    } 
    703709