mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Move pings out-of-band to speed up posting. Props to Owen. fixes #1644
git-svn-id: https://develop.svn.wordpress.org/trunk@2833 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -827,6 +827,19 @@ function debug_fclose($fp) {
|
||||
}
|
||||
}
|
||||
|
||||
function check_for_pings() {
|
||||
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($doping)
|
||||
echo '<iframe src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>';
|
||||
}
|
||||
|
||||
function do_enclose( $content, $post_ID ) {
|
||||
global $wp_version, $wpdb;
|
||||
include_once (ABSPATH . WPINC . '/class-IXR.php');
|
||||
|
||||
Reference in New Issue
Block a user