Closed DavidGoodwin closed 8 years ago
Thanks, I merging this, but going to change it to be it less like a hack. This is what the Android and iOS app use, right?
Yeah, the mobile apps use xmlrpc.
( But in my case I was trying to write a unit test to check that the tinypng plugin was installed/working correctly. )
( and yes, I'm sure you'd want to rewrite it - I didn't bother with exception handling for a start )
Currently the plugin doesn't work for XMLRPC file upload requests - this is a quick and dirty hack that seems to work (at least for me).
You seemingly can't just call Tiny_Settings::admin_init() as the Wordpress XMLRPC stuff doesn't seem to support/setup the various current_user_can() and similar functions.
Using Zend Framework (1.12)'s XmlRpc client the following code now seems to work: