From bac1fccf3ac2f24081874f0e53c20b4801d79fed Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 6 Jun 2007 16:10:52 +0000 Subject: [PATCH] Fix category renaming. fixes #4415 see #4189 git-svn-id: http://svn.automattic.com/wordpress/trunk@5658 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 24f8a572c0..024f37d730 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -216,8 +216,6 @@ function wp_update_term( $term, $taxonomy, $args = array() ) { $args = wp_parse_args($args, $defaults); extract($args); - $parent = (int) $parent; - if ( empty($slug) ) $slug = sanitize_title($name); else @@ -238,7 +236,7 @@ function wp_update_term( $term, $taxonomy, $args = array() ) { $wpdb->query("UPDATE $wpdb->terms SET name = '$name', slug = '$slug', term_group = '$term_group' WHERE term_id = '$term_id'"); if ( empty($slug) ) { - $slug = sanitize_title($slug, $term_id); + $slug = sanitize_title($name, $term_id); $wpdb->query("UPDATE $wpdb->terms SET slug = '$slug' WHERE term_id = '$term_id'"); }