I want to overwrite the "metaWeblog.newMediaObject" xmlrpc call so the file is saved remotely. From mw_newMediaObject in class-wp-xmlrpc-server.php, i see that there is a hook:
do_action('xmlrpc_call', 'metaWeblog.newMediaObject');
So I should be able to do something in my plugin like:
add_action ('xmlrpc_call', 'myWewMediaObject');
function myWewMediaObject ($method) {
if ($method=='metaWeblog.newMediaObject') {
//perform some custom action
}
}
However, since the do_action call is at the beginning of the mw_newMediaObject function, I am unsure how to stop the execution after my plugin function exists.
Please let me know if I am on the right track and if there is another way to do this.