mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
git-svn-id: http://svn.automattic.com/wordpress/trunk@5659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bac1fccf3a
commit
d2188a7dde
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user