Make WordPress Core

Changeset 7914 for trunk/xmlrpc.php


Ignore:
Timestamp:
05/09/2008 04:02:44 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.