Make WordPress Core


Ignore:
Timestamp:
09/05/2004 02:03:51 AM (21 years ago)
Author:
saxmatt
Message:

Set GUID when posting.

File:
1 edited

Legend:

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

    r1599 r1604  
    4242    $result = $wpdb->query($sql);
    4343    $post_ID = $wpdb->insert_id;
    44    
    45     wp_set_post_cats('',$post_ID,$post_category);
     44
     45    // Set GUID
     46    $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'");
     47   
     48    wp_set_post_cats('', $post_ID, $post_category);
    4649   
    4750    if ($post_status == 'publish') {
    4851        do_action('publish_post', $post_ID);
    4952    }
     53
     54    pingback($content, $post_ID);
    5055
    5156    // Return insert_id if we got a good result, otherwise return zero.
Note: See TracChangeset for help on using the changeset viewer.