Jake Vanderwerf
2026-05-31 d7e7d248cbe41cd7a9ef9c2fb022b6c4831f99a3
inc/managers/CRUDManager.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\managers;
use JVBase\base\Site;
use JVBase\registrar\Registrar;
use JVBase\ui\CRUDSkeleton;
@@ -71,11 +72,11 @@
      $this->initTaxonomies();
      // Statuses
      if ($this->registrar && $this->registrar->hasFeature('is_calendar')) {
      if ($this->registrar->hasFeature('is_calendar')) {
         $this->skeleton->setCalendar();
      }
      if ($this->registrar && $this->registrar->getType() === 'post') {
      if ($this->registrar->getType() === 'post') {
         $this->skeleton->setDefaultStatus();
      } else {
         $this->skeleton->setStatuses([]);
@@ -99,7 +100,7 @@
      $this->skeleton->addCapabilities(['view', 'edit', 'create', 'delete']);
      $plural = strtolower($this->registrar->getPlural() ?? $this->content . 's');
      $canPublish = jvbUserIsVerified() && user_can($this->user_id, "publish_{$plural}");
      $canPublish = $this->userIsVerified() && user_can($this->user_id, "publish_{$plural}");
      $this->skeleton->userCanPublish($canPublish);
      // Bulk actions
@@ -122,6 +123,11 @@
      add_filter('jvbAdditionalActions', [$this, 'createItem']);
   }
   protected function userIsVerified():bool {
      $membership = Site::membership();
      return !($membership && $membership->has('member_verified')) || current_user_can('skip_moderation');
   }
   /**
    * Setup uploader configuration
    */