Changeset 9357
- Timestamp:
- 10/26/2008 05:05:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r9349 r9357 2246 2246 'ping_status' => get_option('default_ping_status'), 'post_parent' => 0, 2247 2247 'menu_order' => 0, 'to_ping' => '', 'pinged' => '', 'post_password' => '', 2248 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '' );2248 'guid' => '', 'post_content_filtered' => '', 'post_excerpt' => '', 'import_id' => 0); 2249 2249 2250 2250 $object = wp_parse_args($object, $defaults); … … 2342 2342 $wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) ); 2343 2343 } else { 2344 // If there is a suggested ID, use it if not already present 2345 if ( !empty($import_id) ) { 2346 $import_id = (int) $import_id; 2347 if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) { 2348 $data['ID'] = $import_id; 2349 } 2350 } 2351 2344 2352 $wpdb->insert( $wpdb->posts, $data ); 2345 2353 $post_ID = (int) $wpdb->insert_id;
Note: See TracChangeset
for help on using the changeset viewer.