Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#5341 closed enhancement (invalid)

New wp.getCommentModerationCount XML-RPC method

Reported by: josephscott Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: has-patch developer-feedback
Focuses: Cc:


The WordPress Comment Moderation Notifier http://www.howtogeek.com/howto/the-geek-blog/how-to-geek-software-wordpress-comment-moderation-notifier/ is a Windows app that notifies users about the number of comments in the moderation queue. It does this by requiring a plugin that adds an XML-RPC method called geek.getCommentModerationCount.

This seems like a helpful bit of information to expose, so I put together a patch against -trunk to implement this. It is basically the same code as the plugin with only a few modifications.

The included patch calls the method wp.getCommentModerationCount, other WordPress specific methods are under wp.* so this seemed like the best place for it. It also includes an alias for the geek.getCommentModerationCount method so that this app and others based on it will work unmodified.

Attachments (1)

xmlrpc.php.diff (1.5 KB) - added by josephscott 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @redsweater
11 years ago

I applaud the enthusiasm to add new support to the API, but I'm worried that jumping right on ideas like this might not be the way to go about it. Developing and adding to the API should come with some deliberation, and should strive to expose as much information from the system as possible, in a way that is consistent with the rest of the API.

I feel like the plugin is cool, and allowed the author to achieve something cool. But it's such a pinpointed piece of information, it seems really weird to expose just this through the API without thinking about all the other related information that might be exposed along with it. Why just the moderated comment count? Why not the comment details that go along with it? Why not the UNmoderated comments?

I don't think you should let the very narrow goals of the plugin dictate what your API looks like. The development of the API over the years has been frustratingly slow at times, but surely this can wait for more than a few days after the plugin was released before it creeps into the supported API?

#2 @lloydbudd
11 years ago

  • Keywords developer-feedback added
  • Milestone changed from 2.4 to 2.5

#3 @Viper007Bond
11 years ago

If we do decide to add this feature, the code should be cleaned up first. The SQL query for example is a little heavier than it could be.

#4 @josephscott
11 years ago

I poked around to see if we had an existing function call to do this, but didn't see anything. The SQL query used in the patch is the same one used to show the number of comment awaiting moderation in wp-admin.

If I missed something I'd be happy to use something else. Ideally something that kept properly cached results, unless having it constantly invalidated is more work than it is worth.

#5 @josephscott
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Ticket #5463 replaces this one.

#6 @lloydbudd
10 years ago

  • Milestone 2.5 deleted
Note: See TracTickets for help on using tickets.