Ticket #15741: 15741.diff
| File 15741.diff, 884 bytes (added by , 15 years ago) |
|---|
-
wp-includes/taxonomy.php
1871 1871 // Hierarchical, and it matches an existing term, Do not allow same "name" in the same level. 1872 1872 $siblings = get_terms($taxonomy, array('fields' => 'names', 'get' => 'all', 'parent' => (int)$parent) ); 1873 1873 if ( in_array($name, $siblings) ) { 1874 return new WP_Error('term_exists', __('A term with the nameprovided already exists with this parent.'), $exists['term_id']);1874 return new WP_Error('term_exists', __('A term with the slug provided already exists with this parent.'), $exists['term_id']); 1875 1875 } else { 1876 1876 $slug = wp_unique_term_slug($slug, (object) $args); 1877 1877 if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) )