Make sure ID is set for later update() calls.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fbbbfb9a48
commit
c148b6ce78
|
@ -712,6 +712,9 @@ function wp_insert_post($postarr = array()) {
|
|||
$data['post_mime_type'] = stripslashes( $post_mime_type ); // This isn't in the update
|
||||
$wpdb->insert( $wpdb->posts, $data );
|
||||
$post_ID = (int) $wpdb->insert_id;
|
||||
|
||||
/* use the newly genearted $post_ID */
|
||||
$where = array( 'ID' => $post_ID );
|
||||
}
|
||||
|
||||
if ( empty($post_name) && 'draft' != $post_status ) {
|
||||
|
|
Loading…
Reference in New Issue