Changeset 40919
- Timestamp:
- 06/21/2017 04:03:22 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r40917 r40919 3004 3004 foreach ( $taxonomies as $taxonomy ) { 3005 3005 if ( $clean_taxonomy ) { 3006 wp_cache_delete('all_ids', $taxonomy); 3007 wp_cache_delete('get', $taxonomy); 3008 delete_option("{$taxonomy}_children"); 3009 // Regenerate {$taxonomy}_children 3010 _get_term_hierarchy($taxonomy); 3006 clean_taxonomy_cache( $taxonomy ); 3011 3007 } 3012 3008 … … 3025 3021 3026 3022 wp_cache_set( 'last_changed', microtime(), 'terms' ); 3023 } 3024 3025 /** 3026 * Clean the caches for a taxonomy. 3027 * 3028 * @since 4.9.0 3029 * 3030 * @param string $taxonomy Taxonomy slug. 3031 */ 3032 function clean_taxonomy_cache( $taxonomy ) { 3033 wp_cache_delete( 'all_ids', $taxonomy ); 3034 wp_cache_delete( 'get', $taxonomy ); 3035 3036 // Regenerate cached hierarchy. 3037 delete_option( "{$taxonomy}_children" ); 3038 _get_term_hierarchy( $taxonomy ); 3039 3040 /** 3041 * Fires after a taxonomy's caches have been cleaned. 3042 * 3043 * @since 4.9.0 3044 * 3045 * @param string $taxonomy Taxonomy slug. 3046 */ 3047 do_action( 'clean_taxonomy_cache', $taxonomy ); 3027 3048 } 3028 3049
Note: See TracChangeset
for help on using the changeset viewer.