From c83e1d1ef3408bbfe1b49da69524d7b547be86e9 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 28 Oct 2010 22:15:54 +0000 Subject: [PATCH] Switch to using WP_HTTP_IXR_Client in core. See #10588. git-svn-id: http://svn.automattic.com/wordpress/trunk@16065 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 43d9b7755..591902117 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1741,7 +1741,8 @@ function generic_ping($post_id = 0) { function pingback($content, $post_ID) { global $wp_version; include_once(ABSPATH . WPINC . '/class-IXR.php'); - + include_once(ABSPATH . WPINC . '/class.wp-http-ixr-client.php'); + // original code by Mort (http://mort.mine.nu:8080) $post_links = array(); @@ -1791,7 +1792,7 @@ function pingback($content, $post_ID) { $pagelinkedfrom = get_permalink($post_ID); // using a timeout of 3 seconds should be enough to cover slow servers - $client = new IXR_Client($pingback_server_url); + $client = new WP_HTTP_IXR_Client($pingback_server_url); $client->timeout = 3; $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom); // when set to true, this outputs debug messages by itself @@ -1870,9 +1871,10 @@ function trackback($trackback_url, $title, $excerpt, $ID) { function weblog_ping($server = '', $path = '') { global $wp_version; include_once(ABSPATH . WPINC . '/class-IXR.php'); + include_once(ABSPATH . WPINC . '/class.wp-http-ixr-client.php'); // using a timeout of 3 seconds should be enough to cover slow servers - $client = new IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); + $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); $client->timeout = 3; $client->useragent .= ' -- WordPress/'.$wp_version;