From fe0b8a2aaf49ff5f33a866309ed8730fd7675674 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 10 Feb 2017 03:09:43 +0000 Subject: [PATCH] Pings/Trackbacks: Avoid scheduling multiple `do_pings` events in `_publish_post_hook()`. Props ethitter. Fixes #39828. Built from https://develop.svn.wordpress.org/trunk@40054 git-svn-id: http://core.svn.wordpress.org/trunk@39991 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index d879491910..a33236cc7f 100644 --- a/wp-includes/post.php +++ b/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' ); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 194943f16a..b48f2d2f33 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40053'; +$wp_version = '4.8-alpha-40054'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.