Jake Vanderwerf
3 days ago ba1e1ccf869b818f7a7a897264dfea05563a7796
inc/admin/ContentTaxonomy.php
@@ -6,7 +6,6 @@
}
use JVBase\registrar\Registrar;
use JVBase\registry\TaxonomyRegistrar;
use WP_Error;
use Exception;
@@ -18,7 +17,7 @@
{
    public function __construct()
    {
      if (empty(Registrar::getFeatured('is_content', 'term'))){
      if (empty(Registrar::withFeature('is_content', 'term'))){
         return;
      }
        add_filter(BASE.'handle_bulk_operation', [ $this, 'processOperation' ], 10, 3);
@@ -51,7 +50,7 @@
        // Handle individual taxonomy rebuild
        if (isset($_POST['rebuild_taxonomy']) && wp_verify_nonce($_POST['_wpnonce'], 'rebuild_taxonomy')) {
            $taxonomy = sanitize_text_field($_POST['taxonomy']);
         $registrar = Registrar::getInstance($taxonomy));
         $registrar = Registrar::getInstance($taxonomy);
            if ($registrar && $registrar->hasFeature('is_content')) {
                $results = $this->rebuildCustomTable($taxonomy);
                // Store results in transient to display after redirect
@@ -125,7 +124,7 @@
                    </thead>
                    <tbody>
                    <?php
               $taxonomies = Registrar::getFeatured('is_content', 'term');
               $taxonomies = Registrar::withFeature('is_content', 'term');
               foreach ($taxonomies as $slug):
                  $registrar = Registrar::getInstance($slug);
                        $taxonomy = BASE . $slug;
@@ -291,7 +290,7 @@
            <?php foreach ($results['details'] as $taxonomy => $detail): ?>
                <details>
                    <summary class="row btw">
                    <summary class="row x-btw">
                        <strong><?= esc_html(ucfirst($taxonomy)) ?></strong>
                        <?php if ($detail['errors'] === 0): ?>
                            <span style="color: green;">✓ Success</span>
@@ -324,7 +323,7 @@
        ];
        // Check if this is a content taxonomy
      $registrar = Registrar::getInstance($taxonomy));
      $registrar = Registrar::getInstance($taxonomy);
      if (!$registrar->hasFeature('is_content')) {
            $results['messages'][] = "Taxonomy {$taxonomy} is not a content taxonomy";
            return $results;