Ticket #5809: 5809.03.diff
File 5809.03.diff, 859 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/taxonomy.php
2495 2495 } 2496 2496 $term_id = (int) $wpdb->insert_id; 2497 2497 } 2498 } elseif ( $existing_term['name'] != $name ) {2499 // We've got an existing term, with a different name , Create the new term.2498 } elseif ( $existing_term['name'] != $name || term_exists( $slug ) ) { 2499 // We've got an existing term, with a different name or the slug exists in another taxonomy, Create the new term. 2500 2500 $slug = wp_unique_term_slug($slug, (object) $args); 2501 2501 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) ) { 2502 2502 return new WP_Error('db_insert_error', __('Could not insert term into the database'), $wpdb->last_error);