Jake Vanderwerf
2026-08-26 ccf5e61a075c35d24befc175994b5cb8957ca322
inc/helpers/renderFields.php
@@ -62,9 +62,9 @@
 * @param string $type
 * @return string
 */
function jvbRenderLinks(int $ID, string $type =''):string
function jvbRenderLinks(int $ID, string $type ='post'):string
{
    $cache = Cache::for('user_links', WEEK_IN_SECONDS)->connect('post')->connect('taxonomy')->connect('user');
    $cache = Cache::for('user_links_'.$type, $type,WEEK_IN_SECONDS);
    $cached = $cache->get($ID);
    if ($cached) {
        return $cached;
@@ -143,13 +143,16 @@
/**
 * @param int $ID
 * @param string $type
 * @param ?string $type
 *
 * @return string
 */
function jvbRenderContactInfo(int $ID, string $type = ''):string
function jvbRenderContactInfo(int $ID, ?string $type = null):string
{
    $cache = Cache::for('contact', WEEK_IN_SECONDS)->connect('post')->connect('taxonomy');
   if (is_null($type)) {
      return '';
   }
    $cache = Cache::for('contact_'.$type, $type,WEEK_IN_SECONDS);
    $cached = $cache->get($ID);
    if($cached){
@@ -376,7 +379,7 @@
         return '';
      }
   }
   $cache = Cache::for($term->taxonomy.'_link')->connect('taxonomy');
   $cache = Cache::for($term->taxonomy.'_link', 'term');
   $key = $term->term_id;
   return $cache->remember(
      $key,
@@ -599,9 +602,9 @@
      return '';
   }
   $cache = Cache::for('locations')->connect('taxonomy');
   $key = $cache->generateKey($location);
   $cache = Cache::for('tax_locations', 'term');
   $cached = $cache->get($location);
   $cached = false;
   if ($cached) {
      return $cached;
@@ -633,7 +636,7 @@
   );
   $cached = '<p class="find-us">'.jvbIcon('map-pin').'Find us here: '.$google.$apple.'</p>';
   $cache->set($key, $cached);
   $cache->set($location, $cached);
   return $cached;
}