Changeset 19935 for trunk/xmlrpc.php
- Timestamp:
- 02/17/2012 12:02:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r19801 r19935 55 55 include_once(ABSPATH . WPINC . '/class-wp-xmlrpc-server.php'); 56 56 57 // Turn off all warnings and errors.58 // error_reporting(0);59 60 57 /** 61 58 * Posts submitted via the xmlrpc interface get that title … … 65 62 $post_default_title = ""; 66 63 67 /**68 * Whether to enable XMLRPC Logging.69 *70 * @name xmlrpc_logging71 * @var int|bool72 */73 $xmlrpc_logging = 0;74 75 /**76 * logIO() - Writes logging info to a file.77 *78 * @uses $xmlrpc_logging79 * @package WordPress80 * @subpackage Logging81 *82 * @param string $io Whether input or output83 * @param string $msg Information describing logging reason.84 * @return bool Always return true85 */86 function logIO($io,$msg) {87 global $xmlrpc_logging;88 if ($xmlrpc_logging) {89 $fp = fopen("../xmlrpc.log","a+");90 $date = gmdate("Y-m-d H:i:s ");91 $iot = ($io == "I") ? " Input: " : " Output: ";92 fwrite($fp, "\n\n".$date.$iot.$msg);93 fclose($fp);94 }95 return true;96 }97 98 if ( isset($HTTP_RAW_POST_DATA) )99 logIO("I", $HTTP_RAW_POST_DATA);100 101 64 // Allow for a plugin to insert a different class to handle requests. 102 65 $wp_xmlrpc_server_class = apply_filters('wp_xmlrpc_server_class', 'wp_xmlrpc_server'); … … 105 68 // Fire off the request 106 69 $wp_xmlrpc_server->serve_request(); 70 71 exit; 72 73 /** 74 * logIO() - Writes logging info to a file. 75 * 76 * @deprecated 3.4.0 77 * @deprecated Use error_log() 78 * 79 * @param string $io Whether input or output 80 * @param string $msg Information describing logging reason. 81 */ 82 function logIO( $io, $msg ) { 83 _deprecated_function( __FUNCTION__, '3.4', 'error_log()' ); 84 if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) 85 error_log( $io . ' - ' . $msg ); 86 }
Note: See TracChangeset
for help on using the changeset viewer.