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,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' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue