Make WordPress Core


Ignore:
Timestamp:
03/30/2006 07:36:54 AM (18 years ago)
Author:
ryan
Message:

Future post pinging and cron fixups from masquerade. fixes #2469

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-post.php

    r3634 r3663  
    200200                VALUES ('$post_ID','_encloseme','1')
    201201            ");
    202             spawn_pinger();
     202            wp_schedule_single_event(time(), 'do_pings');
    203203        }
    204204    } else if ($post_type == 'page') {
     
    10031003}
    10041004
     1005function do_all_pings() {
     1006    global $wpdb;
     1007
     1008    // Do pingbacks
     1009    while ($ping = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_pingme' LIMIT 1")) {
     1010        $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';");
     1011        pingback($ping->post_content, $ping->ID);
     1012    }
     1013   
     1014    // Do Enclosures
     1015    while ($enclosure = $wpdb->get_row("SELECT * FROM {$wpdb->posts}, {$wpdb->postmeta} WHERE {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id AND {$wpdb->postmeta}.meta_key = '_encloseme' LIMIT 1")) {
     1016        $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';");
     1017        do_enclose($enclosure->post_content, $enclosure->ID);
     1018    }
     1019
     1020    // Do Trackbacks
     1021    $trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE CHAR_LENGTH(TRIM(to_ping)) > 7 AND post_status = 'publish'");
     1022    if ( is_array($trackbacks) ) {
     1023        foreach ( $trackbacks as $trackback ) {
     1024            do_trackbacks($trackback->ID);
     1025        }
     1026    }
     1027
     1028    //Do Update Services/Generic Pings
     1029    generic_ping();
     1030}
    10051031?>
Note: See TracChangeset for help on using the changeset viewer.