diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index 364b7a4cc5..4c56d37b4b 100644
a
|
b
|
function global_terms( $term_id, $deprecated = '' ) { |
2127 | 2127 | update_option( 'default_category', $global_id ); |
2128 | 2128 | } |
2129 | 2129 | |
2130 | | $wpdb->update( $wpdb->terms, array( 'term_id' => $global_id ), array( 'term_id' => $term_id ) ); |
| 2130 | if ( $global_id < $max_local_id ) { |
| 2131 | $wpdb->update( $wpdb->terms, array( 'term_id' => $global_id ), array( 'term_id' => $term_id ) ); |
| 2132 | } else { |
| 2133 | $wpdb->delete( $wpdb->terms, array( 'term_id' => $term_id ) ); |
| 2134 | $c = (array) $c; |
| 2135 | $c['term_id'] = $global_id; |
| 2136 | $wpdb->insert( $wpdb->terms, $c ); |
| 2137 | } |
| 2138 | |
2131 | 2139 | $wpdb->update( $wpdb->term_taxonomy, array( 'term_id' => $global_id ), array( 'term_id' => $term_id ) ); |
2132 | 2140 | $wpdb->update( $wpdb->term_taxonomy, array( 'parent' => $global_id ), array( 'parent' => $term_id ) ); |
2133 | 2141 | |