Overwrite default XMLRPC function from plugin

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 } } … Read more

PHP library that can merge stylesheet with inline style [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 10 years ago. Improve this question I am working with html document generated from Micrsoft Word 2007/2010. Besides generating incredibly dirty html, word also has the tendency … Read more

How to disable XML-RPC from Linux command-line in a total way?

I read near the end of this guide regarding utilizing SSHguard to protect WordPress from Brute force attacks that after configuring SSHguard the relevant way, one must: disable XML-RPC by blocking all remote access to /xmlrpc.php in your web server configuration. I don’t use XML-RPC in any of my websites. I use Nginx as my … Read more

Unescape HTML entities in JavaScript?

I have some JavaScript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form: <img src=”https://stackoverflow.com/questions/1912501/myimage.jpg”> However, when I use the JavaScript to insert the strings into HTML, they render literally. I don’t see an image, I literally see the string: <img src=”https://stackoverflow.com/questions/1912501/myimage.jpg”> My guess is that the HTML is being … Read more

Storing an XML Response (Transient)?

Haven’t worked much with XML so I’m hitting a bit of a wall: function getapi() { $api_response = wp_remote_get( “http://example.com/getXML” ); $data = wp_remote_retrieve_body( $api_response ); $output = new SimpleXMLElement ($data ); return $output; } Get or set the Transient function transient() { $transient = get_transient( ‘transient_value’ ); if ( ! $transient ) { $transient … Read more