Make WordPress Core

Changeset 11410


Ignore:
Timestamp:
05/20/2009 05:03:19 PM (15 years ago)
Author:
ryan
Message:

Throttle generic pings to no more than once per hour. Props Denis-de-Bernardy. fixes #6698

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r11323 r11410  
    13251325        foreach ( $trackbacks as $trackback )
    13261326            do_trackbacks($trackback);
    1327 
    1328     //Do Update Services/Generic Pings
    1329     generic_ping();
    13301327}
    13311328
  • trunk/wp-includes/default-filters.php

    r11383 r11410  
    187187add_action('do_feed_atom', 'do_feed_atom', 10, 1);
    188188add_action('do_pings', 'do_all_pings', 10, 1);
     189add_action('do_generic_ping', 'generic_ping', 10, 1);
    189190add_action('do_robots', 'do_robots');
    190191add_action('sanitize_comment_cookies', 'sanitize_comment_cookies');
  • trunk/wp-includes/post.php

    r11396 r11410  
    32453245            $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) );
    32463246        do_action('private_to_published', $post->ID);  // Deprecated, use private_to_publish
     3247        // do generic pings once per hour at most
     3248        if ( !wp_next_scheduled('do_generic_ping') )
     3249            wp_schedule_single_event(time() + 3600, 'do_generic_ping');
    32473250    }
    32483251
Note: See TracChangeset for help on using the changeset viewer.