Changeset 13087
- Timestamp:
- 02/13/2010 05:52:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r13083 r13087 1437 1437 if ( empty($slug) ) 1438 1438 $slug = sanitize_title($name); 1439 elseif ( is_term($slug) ) // Provided slug issue. 1440 return new WP_Error('term_slug_exists', __('A Term with the slug provided already exists.')); 1439 1441 1440 1442 $term_group = 0; … … 1453 1455 } 1454 1456 1455 if ( ! $term_id = is_term($slug) ) { 1457 if ( ! $term_id = is_term($slug, $taxonomy) ) { 1458 // Make sure the slug is unique accross all taxonomies. 1459 $slug = wp_unique_term_slug($slug, (object) $args); 1456 1460 if ( !is_multisite() ) { 1457 1461 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) )
Note: See TracChangeset
for help on using the changeset viewer.