Changeset 7939
- Timestamp:
- 05/16/2008 01:43:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r7738 r7939 1304 1304 $values = array(); 1305 1305 $term_order = 0; 1306 $final_t erm_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids');1307 foreach ( $t erm_ids as $term_id )1308 if ( in_array($t erm_id, $final_term_ids) )1309 $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $t erm_id, ++$term_order);1306 $final_tt_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids'); 1307 foreach ( $tt_ids as $tt_id ) 1308 if ( in_array($tt_id, $final_tt_ids) ) 1309 $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order); 1310 1310 if ( $values ) 1311 1311 $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)");
Note: See TracChangeset
for help on using the changeset viewer.