Tag Info

New answers tagged

0

After asking around and looking for alternatives, I came up with a working solution that works in the web frontend and in the Android/iOS XML-RPC based apps. This is the filter. add_filter('wp_insert_post_data', array($this, 'save_content2'), 9, 2); I am pretty sure it is called before the content_save_pre filter. It allows direct access to the post ...


1

It looks like the xmlrpc_prepare_post filter is only applied to the output of the wp_getPost and wp_getRevision methods of the wp_xmlrpc_server class. It would be great if this code line: do_action( 'xmlrpc_call', 'wp.newPost' ); would be replaced with extra input arguments, for example: do_action( 'xmlrpc_call', 'wp.newPost', ..., $content_struct ); ...


1

If your server is an Apache, you can block access before WordPress is even reached with one line in your .htaccess: Redirect 403 /xmlrpc.php You can add another line to keep the response short: ErrorDocument 403 "no" That will send a very minimal response (two bytes plus HTTP headers), and it will save your resources for better traffic.


4

There are plugins for that: e.g. http://wordpress.org/plugins/disable-xml-rpc/ You can also write a filter yourself add_filter('xmlrpc_enabled', '__return_false'); You can simply add this code your theme functions.php (located in wp-content/themes/your_theme). However, you are advised to create a child theme ...


0

For now this is the best answer I can find, but I'm hoping for a better solution out there somewhere. functions.php: function Remove_Unneeded_XMLRPC( $methods ) { unset( $methods['wp.getUsersBlogs'] ); return $methods; } add_filter( 'xmlrpc_methods', 'Remove_Unneeded_XMLRPC' ); found this at: ...



Top 50 recent answers are included