Changeset 31248 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 01/19/2015 04:51:44 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31238 r31248 3921 3921 3922 3922 // Touch every ancestor's lookup row for each post in each term 3923 $ancestors = array();3924 3923 foreach ( $term_ids as $term_id ) { 3925 $ancestors[] = $term_id;3926 3924 $child = $term_id; 3925 $ancestors = array(); 3927 3926 while ( !empty( $terms_by_id[$child] ) && $parent = $terms_by_id[$child]->parent ) { 3928 if ( in_array( $parent, $ancestors ) ) { 3929 break; 3930 } 3931 3927 $ancestors[] = $child; 3932 3928 if ( !empty( $term_items[$term_id] ) ) 3933 3929 foreach ( $term_items[$term_id] as $item_id => $touches ) { … … 3935 3931 } 3936 3932 $child = $parent; 3933 3934 if ( in_array( $parent, $ancestors ) ) { 3935 break; 3936 } 3937 3937 } 3938 3938 }
Note: See TracChangeset
for help on using the changeset viewer.