WordPress.org

Make WordPress Core

Ticket #39828: 39828.diff

File 39828.diff, 474 bytes (added by ethitter, 3 years ago)

Only schedule an event if one doesn't exist

  • src/wp-includes/post.php

     
    59325932                add_post_meta( $post_id, '_pingme', '1' );
    59335933        add_post_meta( $post_id, '_encloseme', '1' );
    59345934
    5935         wp_schedule_single_event(time(), 'do_pings');
     5935        if ( false === wp_next_scheduled( 'do_pings' ) ) {
     5936                wp_schedule_single_event( time(), 'do_pings' );
     5937        }
    59365938}
    59375939
    59385940/**