#16608 closed enhancement (invalid)
Adding an xml-rpc call to get the count of spam comments
Reported by: | plopmaster | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.5 |
Component: | XML-RPC | Keywords: | close |
Focuses: | Cc: |
Description
I made a patch to add an xml-rpc call to get the count of comments in various status (spam, approuved, ...)
The call is name wp.getCommentsStatusCount
Attachments (2)
Change History (9)
#2
@
14 years ago
And I just realized that right-clicking and saving the patch file saves the HTML output of the Trac ticket instead ... uploading the real patch in a readable format ...
#3
@
14 years ago
- Keywords needs-refresh added
Two things:
- What version of WordPress is this patched against? Since it's a patch on
xmlrpc.php
and notwp-includes/class-wp-xmlrpc-server.php
I'm guessing you're not using the latest version (also apparent in your "since 2.7.0" note). Please patch against the current version of WP. - Why do you accept a fourth parameter for status, but hardcode "status=spam"?
#4
@
14 years ago
- Keywords close added; needs-refresh removed
Comment count function in xml-rpc has been added since 2.5.0
#5
@
14 years ago
- Resolution set to invalid
- Status changed from new to closed
There is already an XML-RPC method to get this data: wp.getCommentCount( blog_id, username, password, <post_id> )
The post_id parameter is optional, if it is left off it will give you the comment count totals for the entire site. If you provide it the counts will be just for that post. The counts are broken down by comment status, results look like this:
[approved] => 31 [awaiting_moderation] => 2 [spam] => 2 [total_comments] => 35
#7
@
14 years ago
@ericmann :
1/ I use the latest version of WP. But I indeed lack of knowledge on WP programming...
2/ Bug in the patch :)
@josephscott : so, documentation (http://codex.wordpress.org/XML-RPC_wp#wp.getCommentCount) is lacking this precision ...
Thanks for the help :)
As much as I like compression, you can't read a gzipped file in Trac.