WordPress.org

Make WordPress Core

Ticket #15741: 15741.diff

File 15741.diff, 884 bytes (added by kapeels, 4 years ago)
  • wp-includes/taxonomy.php

     
    18711871                        // Hierarchical, and it matches an existing term, Do not allow same "name" in the same level. 
    18721872                        $siblings = get_terms($taxonomy, array('fields' => 'names', 'get' => 'all', 'parent' => (int)$parent) ); 
    18731873                        if ( in_array($name, $siblings) ) { 
    1874                                 return new WP_Error('term_exists', __('A term with the name provided 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']); 
    18751875                        } else { 
    18761876                                $slug = wp_unique_term_slug($slug, (object) $args); 
    18771877                                if ( false === $wpdb->insert( $wpdb->terms, compact( 'name', 'slug', 'term_group' ) ) )