Introduce a special wp_die handler for XMLRPC requests to ensure we send an XML response.

Props koke for the original patch. See #16748.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2011-04-17 08:35:51 +00:00
parent 9c0a5cd498
commit eed35967cc
2 changed files with 39 additions and 0 deletions
+3
View File
@@ -98,6 +98,9 @@ function logIO($io,$msg) {
if ( isset($HTTP_RAW_POST_DATA) )
logIO("I", $HTTP_RAW_POST_DATA);
// Make sure wp_die output is XML
add_filter( 'wp_die_handler', '_xmlrpc_wp_die_filter' );
// Allow for a plugin to insert a different class to handle requests.
$wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server');
$wp_xmlrpc_server = new $wp_xmlrpc_server_class;