Fix category renaming. fixes #4415 see #4189

git-svn-id: http://svn.automattic.com/wordpress/trunk@5659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-06-06 16:12:02 +00:00
parent bac1fccf3a
commit d2188a7dde
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ function wp_insert_category($catarr) {
$name = apply_filters('pre_category_name', $name);
if ( empty ($slug) )
$slug = sanitize_title($slug);
$slug = sanitize_title($name);
else
$slug = sanitize_title($slug);
$slug = apply_filters('pre_category_nicename', $slug);
@ -93,7 +93,7 @@ function wp_insert_category($catarr) {
if ( empty($parent) || !get_category( $parent ) || ($cat_ID && cat_is_ancestor_of($cat_ID, $parent) ) )
$parent = 0;
$args = compact('slug', 'parent', 'description');
$args = compact('name', 'slug', 'parent', 'description');
if ( $update )
$cat_ID = wp_update_term($cat_ID, 'category', $args);