diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
index 955369e..aa7798d 100644
a
|
b
|
function wp_unique_term_slug($slug, $term) { |
2380 | 2380 | } |
2381 | 2381 | |
2382 | 2382 | // If we didn't get a unique slug, try appending a number to make it unique. |
2383 | | if ( !empty($args['term_id']) ) |
2384 | | $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $args['term_id'] ); |
| 2383 | if ( ! empty( $term->term_id ) ) |
| 2384 | $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $term->term_id ); |
2385 | 2385 | else |
2386 | 2386 | $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $slug ); |
2387 | 2387 | |