[wp-hackers] add_action for XML-RPC

Sean Hickey seanhickey at gmail.com
Tue Mar 21 09:38:21 GMT 2006


Howdy all,
  This is my first post to the list, so I hope I don't offend anyone. 
I've written a couple plugins for WP so far (Auto Links & Edit n Place
at http://www.headzoo.com) and I'm working on a third one now that
uses the built in XML-RPC class (not wp_xmlrpc_server, but the parent
class).

  What I'm wondering is if anyone else thinks it would be a good idea
to create action hook for registering plugin functions with WP's
XML-RPC class?

  Right now my plugin needs all of the WP's functions, variables,
constants, etc. So I send request straight to the index.php script,
let WP set everything up, and then it catches any incoming
$HTTP_RAW_POST_DATA with the `init` filter.  If it thinks the POST is
for the plugin, it takes it, otherwise lets WP go back to doing it's
thing.

  This is a hack that could be avoided if I could just register
functions with the built in XML-RPC class.  Using something like
add_action('xmlrpc-add', $myCallBackFunction);.

  Obviously the popularity of XML-RPC keeps growing, and I can see
more and more developers wanting something like this.  Just my opinion
though.

- Sean Hickey
---
http://www.headzoo.com


More information about the wp-hackers mailing list