From f7e02a7c22040ee745418c8308ef1fdfa408a7a7 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 21 Jul 2009 23:09:47 +0000 Subject: [PATCH] Pings to the people. Return to pinging for updates to published posts. see #6698 git-svn-id: http://svn.automattic.com/wordpress/trunk@11734 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 5 +++-- wp-includes/default-filters.php | 1 - wp-includes/post.php | 9 --------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 72914b5ae..9d7daee21 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1373,6 +1373,9 @@ function do_all_pings() { if ( is_array($trackbacks) ) foreach ( $trackbacks as $trackback ) do_trackbacks($trackback); + + //Do Update Services/Generic Pings + generic_ping(); } /** @@ -1435,8 +1438,6 @@ function generic_ping($post_id = 0) { weblog_ping($service); } - set_transient('generic_ping_last', time(), 1800); - return $post_id; } diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index b5f7be233..2519d7aa1 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -186,7 +186,6 @@ add_action('do_feed_rss', 'do_feed_rss', 10, 1); add_action('do_feed_rss2', 'do_feed_rss2', 10, 1); add_action('do_feed_atom', 'do_feed_atom', 10, 1); add_action('do_pings', 'do_all_pings', 10, 1); -add_action('do_generic_ping', 'generic_ping', 10, 1); add_action('do_robots', 'do_robots'); add_action('sanitize_comment_cookies', 'sanitize_comment_cookies'); add_action('admin_print_scripts', 'print_head_scripts', 20); diff --git a/wp-includes/post.php b/wp-includes/post.php index f5439dd98..7ae5431b0 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3274,15 +3274,6 @@ function _transition_post_status($new_status, $old_status, $post) { if ( '' == get_the_guid($post->ID) ) $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) ); do_action('private_to_published', $post->ID); // Deprecated, use private_to_publish - // do generic pings once per half hour at most - if ( !wp_next_scheduled('do_generic_ping') ) { - $schedule = time(); - $last_ping = get_transient('generic_ping_last'); - if ($last_ping) { - $schedule = max($schedule, $last_ping + 1800); - } - wp_schedule_single_event($schedule, 'do_generic_ping'); - } } // Always clears the hook in case the post status bounced from future to draft.