Ticket #12729: 12729.2.diff
File 12729.2.diff, 715 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/taxonomy.php
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