Fix category renaming. fixes #4415 see #4189

git-svn-id: https://develop.svn.wordpress.org/trunk@5659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-06-06 16:12:02 +00:00
parent 09c96b4292
commit 4feb85438d
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);