Pass taxonomy when looking for duplicate term slug.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c6261f5ff8
commit
46ae8913d3
|
@ -1480,7 +1480,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
||||||
|
|
||||||
if ( empty($slug) )
|
if ( empty($slug) )
|
||||||
$slug = sanitize_title($name);
|
$slug = sanitize_title($name);
|
||||||
elseif ( is_term($slug) ) // Provided slug issue.
|
elseif ( is_term($slug, $taxonomy) ) // Provided slug issue.
|
||||||
return new WP_Error('term_slug_exists', __('A Term with the slug provided already exists.'));
|
return new WP_Error('term_slug_exists', __('A Term with the slug provided already exists.'));
|
||||||
|
|
||||||
$term_group = 0;
|
$term_group = 0;
|
||||||
|
|
Loading…
Reference in New Issue