Jake Vanderwerf
2026-09-13 1aa7c404dae63c9518468fe9b579fad819f8d871
inc/registrar/Registrar.php
@@ -3,6 +3,7 @@
use JVBase\base\Site;
use JVBase\inc\registrar\helpers\AddCustomFields;
use JVBase\inc\registrar\helpers\HideSingle;
use JVBase\managers\Cache;
use JVBase\managers\CRUD;
@@ -57,6 +58,8 @@
   public bool $baseless = false;
   public bool $modify = false;
   protected ?AddCustomFields $addFields = null;
   protected static array $allFlags = [
      //Shared Flags
      'favouritable', 'karma', 'show_feed', 'show_directory', 'approve_new', 'has_responses', 'invitable',
@@ -235,6 +238,9 @@
   private static array $instances = [];
   protected string $based;
   protected static array $processing = ['terms'=>[],'posts'=>[],'users' =>[]];
   private function __construct(string $slug, string $singular, string $plural, string $type) {
      $this->slug = $slug;
      $this->based = jvbCheckBase($slug);
@@ -437,12 +443,12 @@
   {
      $this->fields = new Fields($this->type, $this);
   }
   public function getFields():array
   public function getFields(bool $includeDefaults = true):array
   {
      return array_map(function ($field) {
         return $field->getConfig();
      },
         $this->fields->getFields()
         $this->fields->getFields($includeDefaults)
      );
   }
   public function setIcon(string $icon):self
@@ -885,6 +891,7 @@
         if ($this->registrar) {
            $this->registrar->register();
         }
         $this->addFields = new AddCustomFields($this);
         if ($this->add_image_column) {
            add_filter("manage_{$this->based}_posts_columns", [$this, 'addImageColumn']);
            add_action("manage_{$this->based}_posts_custom_column", [$this, 'showImageColumn'], 10, 2);
@@ -1056,14 +1063,12 @@
      }
      public function addTermUpdatedMeta(int $termId):void
      {
            static $processing = [];
            if (isset($processing[$termId])) return;
            $processing[$termId] = true;
            if (self::$processing['terms'][$termId]) return;
         self::$processing['terms'][$termId] = true;
            update_term_meta($termId, BASE . 'date_modified', date('Y-m-d H:i:s'));
            unset($processing[$termId]);
            unset(self::$processing['terms'][$termId]);
      }
   public function renderContent(string $content, array $block):string