Ticket #13119: 13119.diff
| File 13119.diff, 999 bytes (added by , 16 years ago) |
|---|
-
wp-includes/taxonomy.php
1608 1608 1609 1609 if ( $term_id = is_term($slug) ) { 1610 1610 $existing_term = $wpdb->get_row( $wpdb->prepare( "SELECT name FROM $wpdb->terms WHERE term_id = %d", $term_id), ARRAY_A ); 1611 // We've got an existing term , which matches the name of the new term:1612 if ( is_taxonomy_hierarchical($taxonomy) && $existing_term['name'] == $name ) {1611 // We've got an existing term in the same taxonomy, which matches the name of the new term: 1612 if ( is_taxonomy_hierarchical($taxonomy) && $existing_term['name'] == $name && is_term( (int) $term_id, $taxonomy ) ) { 1613 1613 // Heirarchical, and it matches an existing term, Do not allow same "name" in the same level. 1614 1614 $siblings = get_terms($taxonomy, array('fields' => 'names', 'get' => 'all', 'parent' => (int)$parent) ); 1615 1615 if ( in_array($name, $siblings) ) {