Changeset 30347 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 11/14/2014 09:52:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r30344 r30347 4097 4097 $children_tt_ids = $wpdb->get_col( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_taxonomy WHERE taxonomy = %s AND parent = %d", $term_taxonomy->taxonomy, $term_id ) ); 4098 4098 4099 foreach ( $children_tt_ids as $child_tt_id ) { 4100 $wpdb->update( $wpdb->term_taxonomy, 4101 array( 'parent' => $new_term_id ), 4102 array( 'term_taxonomy_id' => $child_tt_id ) 4103 ); 4104 clean_term_cache( $term_id, $term_taxonomy->taxonomy ); 4099 if ( ! empty( $children_tt_ids ) ) { 4100 foreach ( $children_tt_ids as $child_tt_id ) { 4101 $wpdb->update( $wpdb->term_taxonomy, 4102 array( 'parent' => $new_term_id ), 4103 array( 'term_taxonomy_id' => $child_tt_id ) 4104 ); 4105 clean_term_cache( $term_id, $term_taxonomy->taxonomy ); 4106 } 4107 } else { 4108 // If the term has no children, we must force its taxonomy cache to be rebuilt separately. 4109 clean_term_cache( $new_term_id, $term_taxonomy->taxonomy ); 4105 4110 } 4106 4111
Note: See TracChangeset
for help on using the changeset viewer.