Jake Vanderwerf
9 days ago ed57c386db34d8693ca75311972d0929ebe5f488
inc/admin/ContentTaxonomy.php
@@ -6,7 +6,6 @@
}
use JVBase\registrar\Registrar;
use JVBase\registry\TaxonomyRegistrar;
use WP_Error;
use Exception;
@@ -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
@@ -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;