Update sending pingbacks to use new URL structure. Need to update to receive like that.
git-svn-id: https://develop.svn.wordpress.org/trunk@638 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7c2b2a969f
commit
afa0ffeae3
|
@ -1037,7 +1037,7 @@ function pingback($content, $post_ID) {
|
||||||
|
|
||||||
// Step 1
|
// Step 1
|
||||||
// Parsing the post, external links (if any) are stored in the $post_links array
|
// Parsing the post, external links (if any) are stored in the $post_links array
|
||||||
// This regexp comes straigth from phpfreaks.com
|
// This regexp comes straight from phpfreaks.com
|
||||||
// http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php
|
// http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php
|
||||||
preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp);
|
preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp);
|
||||||
|
|
||||||
|
@ -1089,7 +1089,7 @@ function pingback($content, $post_ID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the GET request
|
// Send the GET request
|
||||||
$request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$wp_version PHP/" . phpversion() . "\r\n\r\n";
|
$request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: WordPress/$wp_version PHP/" . phpversion() . "\r\n\r\n";
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
fputs($fp, $request);
|
fputs($fp, $request);
|
||||||
|
|
||||||
|
@ -1157,7 +1157,7 @@ function pingback($content, $post_ID) {
|
||||||
$method = 'pingback.ping';
|
$method = 'pingback.ping';
|
||||||
debug_fwrite($log, 'Page Linked To: '.$pagelinkedto."\n");
|
debug_fwrite($log, 'Page Linked To: '.$pagelinkedto."\n");
|
||||||
debug_fwrite($log, 'Page Linked From: ');
|
debug_fwrite($log, 'Page Linked From: ');
|
||||||
$pagelinkedfrom = $siteurl.'/'.$blogfilename.'?p='.$post_ID.'&c=1';
|
$pagelinkedfrom = get_permalink($post_ID);
|
||||||
debug_fwrite($log, $pagelinkedfrom."\n");
|
debug_fwrite($log, $pagelinkedfrom."\n");
|
||||||
|
|
||||||
$client = new xmlrpc_client($path, $host, 80);
|
$client = new xmlrpc_client($path, $host, 80);
|
||||||
|
|
Loading…
Reference in New Issue