| | |
| | | <?php |
| | | |
| | | use JVBase\managers\CacheManager; |
| | | use JVBase\managers\Cache; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; // Exit if accessed directly |
| | |
| | | function jvbRenderArtistSummary():string |
| | | { |
| | | $current = get_queried_object(); |
| | | $cache = CacheManager::for('artists', WEEK_IN_SECONDS); |
| | | $key = 'artist-bio-'.$current->ID; |
| | | $cache = Cache::for('artistSummary', WEEK_IN_SECONDS); |
| | | $key = $current->ID; |
| | | $cached = $cache->get($key); |
| | | $cached = false; |
| | | if ($cached !== false) { |
| | | return $cached; |
| | | } |
| | |
| | | $artist = jvbContentFromUser((int)$current->post_author); |
| | | |
| | | $sections = JVB_CONTENT[jvbNoBase($current->post_type)]['sections']??[]; |
| | | jvbDump($sections); |
| | | |
| | | |
| | | |
| | | // $handler = JVB()->getContent(str_replace(BASE,'', $current->post_type)); |
| | |
| | | $link = get_term_link((int)$style, BASE.'style'); |
| | | ?> |
| | | <li> |
| | | <a href="<?=$link?>" title="Learn more about <?=$term->name?>"> |
| | | <?=strtolower($term->name)?> |
| | | <a href="<?=$link?>" title="Learn more about <?=html_entity_decode($term->name)?>"> |
| | | <?=strtolower(html_entity_decode($term->name))?> |
| | | </a> |
| | | </li> |
| | | <?php |
| | |
| | | { |
| | | $current = get_queried_object(); |
| | | |
| | | $cache = CacheManager::for('shops', WEEK_IN_SECONDS); |
| | | $key = 'shop-bio-'.$current->term_id; |
| | | $cache = Cache::for('shop_bio', WEEK_IN_SECONDS)->connect('taxonomy'); |
| | | $key = $current->term_id; |
| | | $cached = $cache->get($key); |
| | | $cached = false; |
| | | if ($cached !== false) { |
| | |
| | | } |
| | | |
| | | ob_start(); |
| | | $handler = JVB()->getContent('shop'); |
| | | |
| | | |
| | | $meta = new JVBase\meta\MetaManager($current->term_id, 'term'); |
| | | $rating = $meta->getValue('average_rating'); |
| | |
| | | |
| | | <?php |
| | | $finished = ob_get_clean(); |
| | | // $cache->set($key, $finished); |
| | | $cache->set($key, $finished); |
| | | return $finished; |
| | | } |
| | | |
| | |
| | | function jvbRenderTermSummary() |
| | | { |
| | | $current = get_queried_object(); |
| | | $cache = CacheManager::for(jvbNoBase($current->taxonomy), WEEK_IN_SECONDS); |
| | | $cache = Cache::for('term_summary', WEEK_IN_SECONDS)->connect('taxonomy'); |
| | | $key = $current->ID; |
| | | $cached = $cache->get($key); |
| | | $cached = false; |
| | | if ($cached !== false) { |
| | | return $cached; |
| | | } |