Changeset 17643
- Timestamp:
- 04/17/2011 08:35:51 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r17642 r17643 2856 2856 2857 2857 /** 2858 * Kill WordPress execution and display XML message with error message. 2859 * 2860 * This is the handler for wp_die when processing XMLRPC requests. 2861 * 2862 * @since 3.2.0 2863 * @access private 2864 * 2865 * @param string $message Error message. 2866 * @param string $title Error title. 2867 * @param string|array $args Optional arguements to control behaviour. 2868 */ 2869 function _xmlrpc_wp_die_handler( $message, $title = '', $args = array() ) { 2870 global $wp_xmlrpc_server; 2871 $defaults = array( 'response' => 500 ); 2872 2873 $r = wp_parse_args($args, $defaults); 2874 2875 if ( $wp_xmlrpc_server ) { 2876 $error = new IXR_Error( $r['response'] , $message); 2877 $wp_xmlrpc_server->output( $error->getXml() ); 2878 } 2879 die(); 2880 } 2881 2882 /** 2883 * Filter to enable special wp_die handler for xmlrpc requests. 2884 * 2885 * @since 3.2.0 2886 * @access private 2887 */ 2888 function _xmlrpc_wp_die_filter() { 2889 return '_xmlrpc_wp_die_handler'; 2890 } 2891 2892 2893 /** 2858 2894 * Retrieve the WordPress home page URL. 2859 2895 * -
trunk/xmlrpc.php
r17642 r17643 99 99 logIO("I", $HTTP_RAW_POST_DATA); 100 100 101 // Make sure wp_die output is XML 102 add_filter( 'wp_die_handler', '_xmlrpc_wp_die_filter' ); 103 101 104 // Allow for a plugin to insert a different class to handle requests. 102 105 $wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server');
Note: See TracChangeset
for help on using the changeset viewer.