Jake Vanderwerf
2026-01-25 b38f03c0e7218762d90fa5092696b127f24f36db
build/summary/render.php
@@ -1,4 +1,7 @@
<?php
use JVBase\managers\Cache;
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
@@ -28,10 +31,9 @@
function jvbRenderArtistSummary():string
{
    $current = get_queried_object();
    $cache = new JVBase\managers\CacheManager('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;
    }
@@ -41,7 +43,7 @@
    $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));
@@ -49,11 +51,11 @@
    <nav id="artist" class="on-this-page index">
        <label>Jump to:
            <button type="button" aria-label="Show Index" title="Show Index" class="toggle" aria-expanded="false">
                <?= jvbIcon('add')?>
                <?= jvbIcon('plus-square')?>
            </button>
        </label>
        <ul>
            <li><a href="#top" title="Back to Top"><?=jvbIcon('up')?></a></li>
            <li><a href="#top" title="Back to Top"><?=jvbIcon('caret-circle-up')?></a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#styles">Styles</a></li>
            <li><a href="#contact">Contact</a></li>
@@ -94,8 +96,8 @@
                            $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
@@ -155,8 +157,8 @@
{
    $current = get_queried_object();
    $cache = new JVBase\managers\CacheManager('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) {
@@ -164,8 +166,6 @@
    }
    ob_start();
    $handler = JVB()->getContent('shop');
    $meta = new JVBase\meta\MetaManager($current->term_id, 'term');
    $rating = $meta->getValue('average_rating');
@@ -181,11 +181,11 @@
    <nav id="shop" class="on-this-page index">
        <label>Jump to:
            <button type="button" aria-label="Show Index" title="Show Index" class="toggle" aria-expanded="false">
                <?= jvbIcon('add')?>
                <?= jvbIcon('plus-square')?>
            </button>
        </label>
        <ul>
            <li><a href="#top" title="Back to Top"><?=jvbIcon('up')?></a></li> <?php
            <li><a href="#top" title="Back to Top"><?=jvbIcon('caret-circle-up')?></a></li> <?php
            if ($rating !== 'none') {
                ?>
                <li><a href="#rating">Rating</a></li>
@@ -278,7 +278,7 @@
    <?php
    $finished = ob_get_clean();
//    $cache->set($key, $finished);
    $cache->set($key, $finished);
    return $finished;
}
@@ -286,10 +286,9 @@
function jvbRenderTermSummary()
{
    $current = get_queried_object();
    $cache = new JVBase\managers\CacheManager($current->taxonomy, WEEK_IN_SECONDS);
    $key = $current->taxonomy.'-'.$current->ID;
    $cache = Cache::for('term_summary', WEEK_IN_SECONDS)->connect('taxonomy');
    $key = $current->ID;
    $cached = $cache->get($key);
    $cached = false;
    if ($cached !== false) {
        return $cached;
    }