mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Switch to using WP_HTTP_IXR_Client in core. See #10588.
git-svn-id: https://develop.svn.wordpress.org/trunk@16065 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a7d5b1d473
commit
4cc293abd2
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user