Changeset 9100
- Timestamp:
- 10/08/2008 09:42:52 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r8957 r9100 431 431 432 432 $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt', 'post_title', 'post_status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent', 'menu_order', 'post_type', 'post_password'); 433 $postdata['import_id'] = $post_ID; 433 434 if ($post_type == 'attachment') { 434 435 $remote_url = $this->get_tag( $post, 'wp:attachment_url' ); -
trunk/wp-includes/post.php
r9083 r9100 1305 1305 'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, 1306 1306 'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '', 1307 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '' );1307 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0); 1308 1308 1309 1309 $postarr = wp_parse_args($postarr, $defaults); … … 1450 1450 if ( isset($post_mime_type) ) 1451 1451 $data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update 1452 // If there is a suggested ID, use it if not already present 1453 if ( !empty($import_id) ) { 1454 $import_id = (int) $import_id; 1455 if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) { 1456 $data['ID'] = $import_id; 1457 } 1458 } 1452 1459 if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { 1453 1460 if ( $wp_error )
Note: See TracChangeset
for help on using the changeset viewer.