| | |
| | | $this->cache->clear(); |
| | | $this->checker = Checker::getInstance(); |
| | | |
| | | if (jvbSiteUsesUmami()) { |
| | | if (Features::hasIntegration('umami')) { |
| | | $this->tracker = JVB()->connect('umami'); |
| | | } |
| | | $this->setupCacheConnections(); |
| | |
| | | return $cache->remember( |
| | | 'feed_link_'.$term->term_id, |
| | | function () use ($term, $postID, $type) { |
| | | return [ |
| | | $base = [ |
| | | 'ID' => $term->term_id, |
| | | 'title' => htmlspecialchars_decode($term->name), |
| | | 'url' => get_term_link($term->term_id, $term->taxonomy), |
| | | 'umami_click' => $this->tracker->trackTaxonomyClick($term->term_id, $term->taxonomy, [ |
| | | 'from' => $type . '_' . $postID |
| | | ]) |
| | | ]; |
| | | if ($this->tracker) { |
| | | $base['umami_click'] =$this->tracker->trackTaxonomyClick($term->term_id, $term->taxonomy, [ |
| | | 'from' => $type . '_' . $postID |
| | | ]); |
| | | } |
| | | return $base; |
| | | } |
| | | ); |
| | | } |