Changeset 6157 for trunk/wp-admin/includes/taxonomy.php
- Timestamp:
- 09/22/2007 06:01:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r6026 r6157 74 74 $parent = $category_parent; 75 75 76 $name = apply_filters('pre_category_name', $name);77 78 if ( empty ($slug) )79 $slug = sanitize_title($name);80 else81 $slug = sanitize_title($slug);82 $slug = apply_filters('pre_category_nicename', $slug);83 84 if ( empty ($description) )85 $description = '';86 $description = apply_filters('pre_category_description', $description);87 88 76 $parent = (int) $parent; 89 77 if ( empty($parent) || !category_exists( $parent ) || ($cat_ID && cat_is_ancestor_of($cat_ID, $parent) ) ) … … 97 85 $cat_ID = wp_insert_term($cat_name, 'category', $args); 98 86 87 if ( is_wp_error($cat_ID) ) 88 return 0; 89 99 90 return $cat_ID['term_id']; 100 91 } … … 105 96 $cat_ID = (int) $catarr['cat_ID']; 106 97 107 if ( $cat_ID == $catarr['category_parent'] )98 if ( $cat_ID == $catarr['category_parent'] ) 108 99 return false; 109 100
Note: See TracChangeset
for help on using the changeset viewer.