wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
clean_taxonomy_cache › WordPress Function
Od4.9.0
Przestarzałyn/a
› clean_taxonomy_cache ( $taxonomy )
| Parametry: |
|
| Zdefiniowane na: |
|
| Codex: |
Cleans the caches for a taxonomy.
Powiązane Funkcje: clean_term_cache, clean_bookmark_cache, clean_category_cache, clean_blog_cache, clean_comment_cache
Źródło
function clean_taxonomy_cache( $taxonomy ) {
wp_cache_delete( 'all_ids', $taxonomy );
wp_cache_delete( 'get', $taxonomy );
wp_cache_set_terms_last_changed();
// Regenerate cached hierarchy.
if ( is_taxonomy_hierarchical( $taxonomy ) ) {
delete_option( "{$taxonomy}_children" );
_get_term_hierarchy( $taxonomy );
}
/**
* Fires after a taxonomy's caches have been cleaned.
*
* @since 4.9.0
*
* @param string $taxonomy Taxonomy slug.
*/
do_action( 'clean_taxonomy_cache', $taxonomy );
}