Pass taxonomy when looking for duplicate term slug.
git-svn-id: https://develop.svn.wordpress.org/trunk@13405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e4b8919c31
commit
4d3733bef0
@ -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
Block a user