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
This commit is contained in:
Sergey Biryukov 2017-02-10 03:08:28 +00:00
parent b4638abeda
commit dae17ac91a
1 changed files with 3 additions and 1 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, '_pingme', '1' );
add_post_meta( $post_id, '_encloseme', '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' );
}
} }
/** /**