Remove already exists check for passed in slug. fixes #12349

git-svn-id: http://svn.automattic.com/wordpress/trunk@14840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-05-24 15:56:50 +00:00
parent 7f96fff66f
commit 8b5b7a7e75
1 changed files with 1 additions and 5 deletions

View File

@ -1586,12 +1586,8 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
$name = stripslashes($name);
$description = stripslashes($description);
$slug_from_name = sanitize_title($name);
if ( empty($slug) )
$slug = $slug_from_name;
elseif ( is_term($slug) && ( $slug != $slug_from_name ) )
return new WP_Error('term_slug_exists', __('A term with the slug provided already exists.'));
$slug = sanitize_title($name);
$term_group = 0;
if ( $alias_of ) {