Changeset 12694 for trunk/wp-admin/includes/taxonomy.php
- Timestamp:
- 01/11/2010 07:27:44 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r12662 r12694 109 109 */ 110 110 function wp_insert_category($catarr, $wp_error = false) { 111 $cat_defaults = array('cat_ID' => 0, ' cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '');111 $cat_defaults = array('cat_ID' => 0, 'taxonomy' => 'category', 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); 112 112 $catarr = wp_parse_args($catarr, $cat_defaults); 113 113 extract($catarr, EXTR_SKIP); … … 143 143 144 144 if ( $update ) 145 $cat_ID = wp_update_term($cat_ID, 'category', $args);145 $cat_ID = wp_update_term($cat_ID, $taxonomy, $args); 146 146 else 147 $cat_ID = wp_insert_term($cat_name, 'category', $args);147 $cat_ID = wp_insert_term($cat_name, $taxonomy, $args); 148 148 149 149 if ( is_wp_error($cat_ID) ) {
Note:
See TracChangeset
for help on using the changeset viewer.