Changeset 5252
- Timestamp:
- 04/12/2007 05:55:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r5249 r5252 297 297 $cat_ID = (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name = '$category'"); 298 298 if ($cat_ID == 0) { 299 if ($cat_ID = wp_insert_category(array('cat_name' => $category))) { 300 $post_cats[] = $cat_ID; 301 } 299 $cat_ID = wp_insert_category(array('cat_name' => $category)); 302 300 } 301 $post_cats[] = $cat_ID; 303 302 } 304 wp_set_post_categories($post_ ID, $post_cats);303 wp_set_post_categories($post_id, $post_cats); 305 304 } 306 305 }
Note: See TracChangeset
for help on using the changeset viewer.