Jake Vanderwerf
2026-01-01 58dccc86754deda247eb49310c266f6cba86d36a
inc/ui/CRUDSkeleton.php
@@ -36,7 +36,7 @@
   protected string $dataType = '';
   protected string $singular = '';
   protected string $plural = '';
   protected string $icon = 'triangle';
   protected string $icon;
   // Capabilities
   protected array $caps = [];
@@ -134,6 +134,7 @@
   protected array $additionalClasses = [];
   public function __construct() {
      $this->icon = jvbDefaultIcon();
      $this->user = wp_get_current_user();
      $this->user_id = $this->user->ID;
   }
@@ -238,7 +239,7 @@
   /**
    * Add a view type (grid, table, list, timeline)
    */
   public function addViews(?array $views):self
   public function addViews(?array $views = null):self
   {
      if (!$views) {
         $views = $this->defaultViews;
@@ -612,7 +613,8 @@
         return;
      }
      ?>
      <div class="all-filters col start" data-ignore>
      <details class="all-filters col start" data-ignore>
         <summary>Filters</summary>
         <?php
         $this->renderSearch();
@@ -624,7 +626,7 @@
            $this->renderColumnSelector();
         }
         ?>
      </div>
      </details>
      <?php
   }
@@ -1036,6 +1038,7 @@
         $temp = array_filter($this->fields, function ($field) {
            return in_array($field, $this->timelineUniqueFields);
         }, ARRAY_FILTER_USE_KEY);
         jvbDump($temp);
         $form = new MetaForm();
         echo '<template class="timelineItem">';
         $form->renderImagePreview(null,['fields' => $temp]);
@@ -1111,7 +1114,7 @@
      }
      ob_start();
      ?>
      <div class="item-actions">
      <div class="item-actions row btw abs">
         <?php
         foreach ($this->itemActions as $action) {
            $config = $this->defaultItemActions[$action];
@@ -1698,7 +1701,7 @@
   protected function getApplicableStatuses(string $prefix) {
      foreach ($this->statuses as $status) {
         if ($status === 'all' || !in_array($status, $this->allowedStatuses)) {
         if ($status === 'all' || !array_key_exists($status, $this->allowedStatuses)) {
            continue;
         }
         $config = $this->allowedStatuses[$status];
@@ -1721,9 +1724,8 @@
               value="<?= esc_attr($status)?>"
               id="<?=$prefix?>set-<?= esc_attr($status) ?>"
            <?= $disabled?>>
         <label for="<?=$prefix?>set-<?=esc_attr($status)?>">
            <?= jvbDashIcon($config['icon'], ['title' => $config['label']]) ?>
            <span><?= esc_html($config['label'])?></span>
         <label for="<?=$prefix?>set-<?=esc_attr($status)?>" title="<?=esc_html($config['label'])?>">
            <?= jvbDashIcon($config['icon']) ?>
         </label>
         <?php
      }