Jake Vanderwerf
2026-08-25 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a
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){
@@ -319,7 +322,7 @@
                    $date = new Date('M j, Y', strtotime($review['date']));
                }
                $out .= '<cite class="row btw">';
                $out .= '<cite class="row x-btw">';
                if ($review['rating'] !== 'none') {
                    $out .= jvbFormatStarRating($review['rating']);
                }
@@ -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,
@@ -428,7 +431,7 @@
         <div class="upload-group">
            <div class="group-header">
               <div class="selected">
                  <div class="field">
                  <div class="field checkbox">
                     <input type="checkbox" id="select-all" name="select-all" data-selects="item-grid" data-select-all>
                     <label for="select-all">
                        Select All In Group
@@ -449,7 +452,7 @@
               </div>
            </div>
            <details>
               <summary class="row btw">
               <summary class="row x-btw">
                  Extra Fields
               </summary>
               <div class="fields"></div>
@@ -463,7 +466,7 @@
      </template>
      <template class="groupActions">
         <div class="item-actions">
            <div class="radio-button">
            <div class="btn">
               <input type="radio" class="featured btn" name="featured" id="featured">
               <label for="featured">
                  <?=jvbIcon('star')?>
@@ -524,7 +527,7 @@
               </div>
               <div class="selection-actions">
                  <div class="selected">
                     <div class="field">
                     <div class="field checkbox">
                        <input type="checkbox" id="select-all-restore" name="select-all-restore">
                        <label for="select-all-restore">
                           Select All
@@ -599,7 +602,7 @@
      return '';
   }
   $cache = Cache::for('locations')->connect('taxonomy');
   $cache = Cache::for('tax_locations', 'term');
   $key = $cache->generateKey($location);
   $cached = false;