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
This commit is contained in:
Sergey Biryukov 2017-02-10 03:09:43 +00:00
parent 62dc0e6c57
commit fe0b8a2aaf
2 changed files with 4 additions and 2 deletions

View File

@ -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' );
}
}
/**

View File

@ -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.