Changeset 3849 for trunk/wp-admin/admin-db.php
- Timestamp:
- 06/06/2006 05:04:41 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-db.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-db.php
r3845 r3849 188 188 $posts = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE category_id='$cat_ID'"); 189 189 if ( is_array($posts) ) foreach ($posts as $post_id) { 190 $cats = wp_get_post_cat s('',$post_id);190 $cats = wp_get_post_categories($post_id); 191 191 if ( 1 == count($cats) ) 192 192 $cats = array($default_cat); 193 193 else 194 194 $cats = array_diff($cats, array($cat_ID)); 195 wp_set_post_cat s('',$post_id, $cats);195 wp_set_post_categories($post_id, $cats); 196 196 } 197 197 … … 231 231 232 232 if ($post_id) 233 wp_set_post_cat s('',$post_id, $cat_ids);233 wp_set_post_categories($post_id, $cat_ids); 234 234 235 235 return $cat_ids;
Note: See TracChangeset
for help on using the changeset viewer.