Make WordPress Core

Changeset 3384


Ignore:
Timestamp:
12/31/2005 09:24:56 PM (19 years ago)
Author:
ryan
Message:

Trackback tweaks. Props http://blog.serv.idv.tw/2005/12/29/380/. fixes #2170

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/execute-pings.php

    r3322 r3384  
    2020    }
    2121    // Do Trackbacks
    22     while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
    23         echo "Trackback : $trackback->ID<br/>";
    24         do_trackbacks($trackback->ID);
     22    $trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'");
     23
     24    if (is_array($trackbacks) && count($trackbacks)) {
     25        foreach ($trackbacks as $trackback  ) {
     26            echo "Trackback : $trackback->ID<br/>";
     27            do_trackbacks($trackback->ID);
     28        }
    2529    }
    2630}
  • trunk/wp-includes/functions-post.php

    r3378 r3384  
    698698    $to_ping = get_to_ping($post_id);
    699699    $pinged  = get_pung($post_id);
    700     if ( empty($to_ping) )
     700    if ( empty($to_ping) ) {
     701        $wpdb->query("UPDATE $wpdb->posts SET to_ping = '' WHERE ID = '$post_id'");
    701702        return;
     703    }
     704   
    702705    if (empty($post->post_excerpt))
    703706        $excerpt = apply_filters('the_content', $post->post_content);
Note: See TracChangeset for help on using the changeset viewer.