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:
parent
b4638abeda
commit
dae17ac91a
|
@ -5932,8 +5932,10 @@ function _publish_post_hook( $post_id ) {
|
|||
add_post_meta( $post_id, '_pingme', '1' );
|
||||
add_post_meta( $post_id, '_encloseme', '1' );
|
||||
|
||||
if ( ! wp_next_scheduled( 'do_pings' ) ) {
|
||||
wp_schedule_single_event( time(), 'do_pings' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the post's parent's post_ID
|
||||
|
|
Loading…
Reference in New Issue