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:
Ryan Boren
2005-09-02 16:56:28 +00:00
parent 448122ff3c
commit 5932ee4425
4 changed files with 62 additions and 4 deletions

View File

@@ -155,9 +155,17 @@ function wp_insert_post($postarr = array()) {
if ($post_status == 'publish') {
do_action('publish_post', $post_ID);
if ($post_pingback)
register_shutdown_function('pingback', $content, $post_ID);
register_shutdown_function('do_enclose', $content, $post_ID );
register_shutdown_function('do_trackbacks', $post_ID);
$result = $wpdb->query("
INSERT INTO $wpdb->postmeta
(post_id,meta_key,meta_value)
VALUES ('$post_ID','_pingme','1')
");
$result = $wpdb->query("
INSERT INTO $wpdb->postmeta
(post_id,meta_key,meta_value)
VALUES ('$post_ID','_encloseme','1')
");
//register_shutdown_function('do_trackbacks', $post_ID);
} else if ($post_status == 'static') {
generate_page_rewrite_rules();