Ticket #5809: 5809.diff
File 5809.diff, 838 bytes (added by , 14 years ago) |
---|
-
wp-includes/taxonomy.php
1948 1948 } 1949 1949 } 1950 1950 1951 if ( $term_id = term_exists($slug) ) { 1951 $term_id = term_exists($slug); 1952 $other_tax_exists = $wpdb->get_var( $wpdb->prepare( "SELECT taxonomy FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) ); 1953 1954 if ( $term_id && !$other_tax_exists ) { 1952 1955 $existing_term = $wpdb->get_row( $wpdb->prepare( "SELECT name FROM $wpdb->terms WHERE term_id = %d", $term_id), ARRAY_A ); 1953 1956 // We've got an existing term in the same taxonomy, which matches the name of the new term: 1954 1957 if ( is_taxonomy_hierarchical($taxonomy) && $existing_term['name'] == $name && $exists = term_exists( (int) $term_id, $taxonomy ) ) {