Changeset 8600 for trunk/wp-admin/import/wp-cat2tag.php
- Timestamp:
- 08/09/2008 05:36:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wp-cat2tag.php
r8279 r8600 104 104 if ( in_array( intval($category->term_id), $this->hybrids_ids ) ) 105 105 echo ' <a href="#note"> * </a>'; 106 106 107 107 if ( isset($hier[$category->term_id]) ) 108 108 $this->_category_children($category, $hier); ?></li> … … 244 244 if ( ! ($id = is_term( $category->slug, 'post_tag' ) ) ) 245 245 $id = wp_insert_term($category->name, 'post_tag', array('slug' => $category->slug)); 246 246 247 247 $id = $id['term_taxonomy_id']; 248 248 $posts = get_objects_in_term($category->term_id, 'category'); … … 253 253 clean_post_cache($post); 254 254 } 255 255 256 256 if ( $values ) { 257 257 $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join(',', $values) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)"); … … 263 263 continue; 264 264 } 265 265 266 266 // if tag already exists, add it to all posts in the category 267 267 if ( $tag_ttid = $wpdb->get_var( $wpdb->prepare("SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE term_id = %d AND taxonomy = 'post_tag'", $category->term_id) ) ) {
Note: See TracChangeset
for help on using the changeset viewer.