Jake Vanderwerf
2026-05-03 9bbeea742424837fb58207d88e10dbca0b2cae04
inc/ui/CRUDSkeleton.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\ui;
use JVBase\base\Site;
use JVBase\managers\UserTermsManager;
use JVBase\meta\Form;
use JVBase\registrar\Registrar;
@@ -216,7 +217,6 @@
    */
   public function addTaxonomyFilter(array $taxonomies, ?string $limit = null): self {
      foreach($taxonomies as $taxonomy) {
         error_log('Fetchinig taxonomy: '.print_r($taxonomy, true));
         $registrar = Registrar::getInstance($taxonomy);
         if ($registrar) {
@@ -235,7 +235,7 @@
   protected function taxConfig(string $taxonomy, string $label = ''):array
   {
      $isVerified = jvbUserIsVerified();
      $isVerified = $this->userIsVerified();
      $label = ($label === '') ? Registrar::getInstance($taxonomy)->getPlural() : $label;
      return [
         'type'      => 'taxonomy',
@@ -247,6 +247,13 @@
      ];
   }
   protected function userIsVerified():bool
   {
      $membership = Site::membership();
      return !($membership && $membership->has('member_verified')) || current_user_can('skip_moderation');
   }
   public function addSearch():self
   {
      $this->hasSearch = true;
@@ -902,7 +909,7 @@
      if ($limit) {
         if ($limit === 'user') {
            $manager = new UserTermsManager();
            return $manager->getUserTerms($this->user_id, $taxonomy);
            return $manager->fetchUserTerms($this->user_id, $taxonomy);
         } else {
            $limit = (int)$limit;
         }
@@ -1555,7 +1562,10 @@
         <input type="hidden" name="content" value="<?=$this->dataType?>" />
         <div class="fields">
            <?php
            echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-'));
            if (!empty($this->statuses)) {
               echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-'));
            }
            if (!empty($this->sections)) {