Changeset 40920
- Timestamp:
- 06/21/2017 04:11:58 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r40919 r40920 3549 3549 array( 'term_taxonomy_id' => $child_tt_id ) 3550 3550 ); 3551 clean_term_cache( $term_id, $term_taxonomy->taxonomy);3551 clean_term_cache( (int) $child_tt_id, '', false ); 3552 3552 } 3553 3553 } else { 3554 3554 // If the term has no children, we must force its taxonomy cache to be rebuilt separately. 3555 clean_term_cache( $new_term_id, $term_taxonomy->taxonomy ); 3556 } 3555 clean_term_cache( $new_term_id, $term_taxonomy->taxonomy, false ); 3556 } 3557 3558 clean_term_cache( $term_id, $term_taxonomy->taxonomy, false ); 3559 3560 /* 3561 * Taxonomy cache clearing is delayed to avoid race conditions that may occur when 3562 * regenerating the taxonomy's hierarchy tree. 3563 */ 3564 $taxonomies_to_clean = array( $term_taxonomy->taxonomy ); 3557 3565 3558 3566 // Clean the cache for term taxonomies formerly shared with the current term. 3559 $shared_term_taxonomies = $wpdb->get_ row( $wpdb->prepare( "SELECT taxonomy FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) );3560 if ( $shared_term_taxonomies ) {3561 foreach ( $shared_term_taxonomies as $shared_term_taxonomy ) { 3562 clean_term_cache( $term_id, $shared_term_taxonomy );3563 }3567 $shared_term_taxonomies = $wpdb->get_col( $wpdb->prepare( "SELECT taxonomy FROM $wpdb->term_taxonomy WHERE term_id = %d", $term_id ) ); 3568 $taxonomies_to_clean = array_merge( $taxonomies_to_clean, $shared_term_taxonomies ); 3569 3570 foreach ( $taxonomies_to_clean as $taxonomy_to_clean ) { 3571 clean_taxonomy_cache( $taxonomy_to_clean ); 3564 3572 } 3565 3573
Note: See TracChangeset
for help on using the changeset viewer.