mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Future post pinging and cron fixups from masquerade. fixes #2469
git-svn-id: https://develop.svn.wordpress.org/trunk@3663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1119,27 +1119,6 @@ function debug_fclose($fp) {
|
||||
}
|
||||
}
|
||||
|
||||
function spawn_pinger() {
|
||||
global $wpdb;
|
||||
$doping = false;
|
||||
if ( $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' LIMIT 1") )
|
||||
$doping = true;
|
||||
|
||||
if ( $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pingme' OR meta_key = '_encloseme' LIMIT 1") )
|
||||
$doping = true;
|
||||
|
||||
if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
|
||||
return $doping;
|
||||
|
||||
if ( $doping ) {
|
||||
$ping_url = get_settings('siteurl') .'/wp-admin/execute-pings.php';
|
||||
$parts = parse_url($ping_url);
|
||||
$argyle = @ fsockopen($parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01);
|
||||
if ( $argyle )
|
||||
fputs($argyle, "GET {$parts['path']}?time=".time()." HTTP/1.0\r\nHost: {$_SERVER['HTTP_HOST']}\r\n\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
function do_enclose( $content, $post_ID ) {
|
||||
global $wp_version, $wpdb;
|
||||
include_once (ABSPATH . WPINC . '/class-IXR.php');
|
||||
|
||||
Reference in New Issue
Block a user