We use generic ping functions now.
git-svn-id: https://develop.svn.wordpress.org/trunk@1077 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dfbe32bf8d
commit
c48dea5a4b
|
@ -610,78 +610,6 @@ function generic_ping($post_id = 0) {
|
|||
|
||||
add_action('publish_post', 'generic_ping');
|
||||
|
||||
// pings Weblogs.com
|
||||
function pingWeblogs($blog_ID = 1) {
|
||||
// original function by Dries Buytaert for Drupal
|
||||
if ((!((get_settings('blogname')=="my weblog") && (get_settings('siteurl')=="http://example.com") && (get_settings('blogfilename') == "wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && (get_settings('use_weblogsping'))) {
|
||||
$client = new xmlrpc_client("/RPC2", "rpc.weblogs.com", 80);
|
||||
$message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval(get_settings('blogname')),
|
||||
new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename')
|
||||
)));
|
||||
$result = $client->send($message);
|
||||
if (!$result || $result->faultCode()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// pings Weblogs.com/rssUpdates
|
||||
function pingWeblogsRss($blog_ID = 1, $rss_url) {
|
||||
global $use_weblogsrssping, $rss_url;
|
||||
if (get_settings('blogname') != 'my weblog' && $rss_url != 'http://example.com/b2rdf.php' && $use_weblogsrssping) {
|
||||
$client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80);
|
||||
$message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($rss_url)));
|
||||
$result = $client->send($message);
|
||||
if (!$result || $result->faultCode()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// pings CaféLog.com
|
||||
function pingCafelog($cafelogID,$title='',$p='') {
|
||||
global $use_cafelogping;
|
||||
if ((!((get_settings('blogname')=="my weblog") && (get_settings('siteurl') == "http://example.com") && (get_settings('blogfilename')=="wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_cafelogping) && ($cafelogID != '')) {
|
||||
$client = new xmlrpc_client("/xmlrpc.php", "cafelog.tidakada.com", 80);
|
||||
$message = new xmlrpcmsg("b2.ping", array(new xmlrpcval($cafelogID), new xmlrpcval($title), new xmlrpcval($p)));
|
||||
$result = $client->send($message);
|
||||
if (!$result || $result->faultCode()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// pings Blo.gs
|
||||
function pingBlogs($blog_ID="1") {
|
||||
global $use_rss;
|
||||
if ((!((get_settings('blogname')=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && (get_settings('use_blodotgsping'))) {
|
||||
$url = get_settings('siteurl').'/'.get_settings('blogfilename');
|
||||
$client = new xmlrpc_client('/', 'ping.blo.gs', 80);
|
||||
if ($use_rss) {
|
||||
$message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval(get_settings('siteurl').'/b2rss.xml')));
|
||||
} else {
|
||||
$message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($url)));
|
||||
}
|
||||
$result = $client->send($message);
|
||||
if (!$result || $result->faultCode()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Send a Trackback
|
||||
function trackback($trackback_url, $title, $excerpt, $ID) {
|
||||
global $wpdb, $tableposts;
|
||||
|
|
Loading…
Reference in New Issue