git-svn-id: https://develop.svn.wordpress.org/trunk@3384 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-31 21:24:56 +00:00
parent 9f7f499ed8
commit db2bd867db
2 changed files with 11 additions and 4 deletions

View File

@ -19,9 +19,13 @@ function execute_all_pings() {
echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>";
}
// Do Trackbacks
while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
echo "Trackback : $trackback->ID<br/>";
do_trackbacks($trackback->ID);
$trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'");
if (is_array($trackbacks) && count($trackbacks)) {
foreach ($trackbacks as $trackback ) {
echo "Trackback : $trackback->ID<br/>";
do_trackbacks($trackback->ID);
}
}
}

View File

@ -697,8 +697,11 @@ function do_trackbacks($post_id) {
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = $post_id");
$to_ping = get_to_ping($post_id);
$pinged = get_pung($post_id);
if ( empty($to_ping) )
if ( empty($to_ping) ) {
$wpdb->query("UPDATE $wpdb->posts SET to_ping = '' WHERE ID = '$post_id'");
return;
}
if (empty($post->post_excerpt))
$excerpt = apply_filters('the_content', $post->post_content);
else