wp-includes/post.php 1 location
|
@@ 3215-3221 (lines=7) @@
|
3212 |
|
$data['ID'] = $import_id; |
3213 |
|
} |
3214 |
|
} |
3215 |
|
if ( false === $wpdb->insert( $wpdb->posts, $data ) ) { |
3216 |
|
if ( $wp_error ) { |
3217 |
|
return new WP_Error('db_insert_error', __('Could not insert post into the database'), $wpdb->last_error); |
3218 |
|
} else { |
3219 |
|
return 0; |
3220 |
|
} |
3221 |
|
} |
3222 |
|
$post_ID = (int) $wpdb->insert_id; |
3223 |
|
|
3224 |
|
// Use the newly generated $post_ID. |
wp-includes/taxonomy.php 1 location
|
@@ 3715-3717 (lines=3) @@
|
3712 |
|
'term_group' => $shared_term->term_group, |
3713 |
|
); |
3714 |
|
|
3715 |
|
if ( false === $wpdb->insert( $wpdb->terms, $new_term_data ) ) { |
3716 |
|
return new WP_Error( 'db_insert_error', __( 'Could not split shared term.' ), $wpdb->last_error ); |
3717 |
|
} |
3718 |
|
|
3719 |
|
$new_term_id = (int) $wpdb->insert_id; |
3720 |
|
|