[wp-hackers] Importing custom format into WordPress
ringmaster at midnightcircus.com
Fri Dec 30 16:43:07 GMT 2005
Aaron Brazell wrote:
> I'd be interested to carry this conversation on to get as much input as
> possible before trying to tackle such a plugin. XML-RPC isn't really my
New XMLRPC hooks are really easy to implement in WordPress.
Just add a sink to 'xmlrpc_methods'. The incoming parameter is an array
of supported methods. Add a new array element using the method name as
the key and the function name as the value:
$methods['wordpress.getusers'] = 'wprpc_getusers';
Then implement the function you added to dispatch the RPC:
$user_login = $args;
$user_pass = $args;
// Verify user
if (!user_pass_ok($user_login, $user_pass))
return new IXR_Error(403, 'Bad login/pass combination.');
// Good login, return the requested info...
Consuming XMLRPC isn't hard either. Feel lucky about the "Incutio
XMLRPC" library used in WordPress for more info.
More information about the wp-hackers