From 1cb798cf916535196b293fe17a039e0c63a34a39 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 24 May 2010 15:56:50 +0000 Subject: [PATCH] Remove already exists check for passed in slug. fixes #12349 git-svn-id: https://develop.svn.wordpress.org/trunk@14840 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 6f531178be..35781df6f9 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -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 ) {