From 09c96b4292a73b0c03a2486bf5e5ad534b7277a2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 6 Jun 2007 16:10:52 +0000 Subject: [PATCH] Fix category renaming. fixes #4415 see #4189 git-svn-id: https://develop.svn.wordpress.org/trunk@5658 602fd350-edb4-49c9-b593-d223f7449a82 --- 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'"); }