From dae17ac91a427a1ee57f4bd74c830d3f8c538a2b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 10 Feb 2017 03:08:28 +0000 Subject: [PATCH] Pings/Trackbacks: Avoid scheduling multiple `do_pings` events in `_publish_post_hook()`. Props ethitter. Fixes #39828. git-svn-id: https://develop.svn.wordpress.org/trunk@40054 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index d879491910..a33236cc7f 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -5932,7 +5932,9 @@ function _publish_post_hook( $post_id ) { add_post_meta( $post_id, '_pingme', '1' ); add_post_meta( $post_id, '_encloseme', '1' ); - wp_schedule_single_event(time(), 'do_pings'); + if ( ! wp_next_scheduled( 'do_pings' ) ) { + wp_schedule_single_event( time(), 'do_pings' ); + } } /**