| | |
| | | if ($tax !== $taxonomy) return; |
| | | |
| | | $term = get_term($term_id, $tax); |
| | | jvbUpdateCacheTimestamp('term', $term); |
| | | |
| | | // Clear taxonomy cache |
| | | CacheManager::invalidateGroup($taxonomy); |
| | | CacheManager::invalidateGroup('terms'); |
| | | CacheManager::invalidateGroup('termCheck'); |
| | | CacheManager::for(jvbNoBase($taxonomy))->invalidate(); |
| | | |
| | | // Clear cache for associated content types |
| | | $checker = Checker::getInstance(); |
| | | $content_types = $checker->getContentForTaxonomy($taxonomy); |
| | | |
| | | foreach ($content_types as $content_type) { |
| | | CacheManager::invalidateGroup($content_type); |
| | | CacheManager::for($content_type)->invalidate(); |
| | | } |
| | | |
| | | do_action("jvb_taxonomy_cache_invalidated_{$taxonomy}", $term, $action); |