| | |
| | | } |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\registry\TaxonomyRegistrar; |
| | | use WP_Error; |
| | | use Exception; |
| | | |
| | |
| | | // 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 |
| | |
| | | ]; |
| | | |
| | | // 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; |