- File:
-
- 1 edited
-
branches/4.1/src/wp-includes/taxonomy.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-includes/taxonomy.php
r30959 r31476 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. … … 4337 4337 * 4338 4338 * @since 3.1.0 4339 * @since 4.1.1 Introduced the `$resource_type` parameter. 4339 4340 * 4340 4341 * @param array $ancestors An array of object ancestors. … … 4343 4344 * @param string $resource_type Type of resource $object_type is. 4344 4345 */ 4345 return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type );4346 return apply_filters( 'get_ancestors', $ancestors, $object_id, $object_type, $resource_type ); 4346 4347 } 4347 4348
Note:
See TracChangeset
for help on using the changeset viewer.