Changeset 31378 for branches/4.1/src/wp-includes/taxonomy.php
- Timestamp:
- 02/09/2015 03:58:35 AM (10 years ago)
- Location:
- branches/4.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1
-
branches/4.1/src/wp-includes/taxonomy.php
r31084 r31378 3354 3354 3355 3355 // Check for duplicate slug 3356 $ id = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE slug = %s", $slug ));3357 if ( $ id && ($id != $term_id)) {3356 $duplicate = get_term_by( 'slug', $slug, $taxonomy ); 3357 if ( $duplicate && $duplicate->term_id != $term_id ) { 3358 3358 // If an empty slug was passed or the parent changed, reset the slug to something unique. 3359 3359 // Otherwise, bail.
Note: See TracChangeset
for help on using the changeset viewer.