Ticket #5341 (closed enhancement: invalid)

Opened 1 year ago

Last modified 1 year ago

New wp.getCommentModerationCount XML-RPC method

Reported by: josephscott Assigned to: anonymous
Priority: normal Milestone:
Component: XML-RPC Version:
Severity: normal Keywords: has-patch developer-feedback
Cc: josephscott

Description

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

xmlrpc.php.diff (1.5 kB) - added by josephscott on 11/12/07 04:36:08.

Change History

11/12/07 04:36:08 changed by josephscott

  • attachment xmlrpc.php.diff added.

11/12/07 08:15:52 changed by redsweater

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?

11/12/07 20:58:14 changed by lloydbudd

  • keywords changed from has-patch to has-patch developer-feedback.
  • milestone changed from 2.4 to 2.5.

11/13/07 00:32:19 changed by Viper007Bond

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.

11/13/07 00:43:22 changed by josephscott

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.

12/13/07 16:02:38 changed by josephscott

  • status changed from new to closed.
  • resolution set to invalid.

Ticket #5463 replaces this one.

12/13/07 17:02:50 changed by lloydbudd

  • milestone deleted.