1 | *** is/taxonomy.php Wed Sep 5 16:27:59 2012 |
---|
2 | --- should/taxonomy.php Wed Sep 5 16:50:37 2012 |
---|
3 | *************** |
---|
4 | *** 2225,2231 **** |
---|
5 | if ( in_array($tt_id, $final_tt_ids) ) |
---|
6 | $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order); |
---|
7 | if ( $values ) |
---|
8 | ! $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)"); |
---|
9 | } |
---|
10 | |
---|
11 | do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids); |
---|
12 | --- 2225,2232 ---- |
---|
13 | if ( in_array($tt_id, $final_tt_ids) ) |
---|
14 | $values[] = $wpdb->prepare( "(%d, %d, %d)", $object_id, $tt_id, ++$term_order); |
---|
15 | if ( $values ) |
---|
16 | ! if ( false === $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)")) |
---|
17 | ! return new WP_Error('db_insert_error', __('Could not insert term relationship into the database'), $wpdb->last_error); |
---|
18 | } |
---|
19 | |
---|
20 | do_action('set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids); |
---|