From c19264ac916707096fe294d996a1b7fb85206b34 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 08 Mar 2026 19:55:31 +0000
Subject: [PATCH] =Furthering along the complete refactor. Added some basic setup for is_content taxonomies, including a page for an archive of the terms.

---
 inc/helpers/terms.php |   63 -------------------------------
 1 files changed, 0 insertions(+), 63 deletions(-)

diff --git a/inc/helpers/terms.php b/inc/helpers/terms.php
index 77f8fec..bf1c00c 100644
--- a/inc/helpers/terms.php
+++ b/inc/helpers/terms.php
@@ -42,69 +42,6 @@
 }
 
 /**
- * Clear taxonomy list caches when terms are saved
- * @param int $term_id
- * @param int $tt_id
- * @param string $taxonomy
- *
- * @return void
- */
-add_action('edited_term', 'jvbClearTermListCache', 10, 3);
-add_action('created_term', 'jvbClearTermListCache', 10, 3);
-add_action('delete_term', 'jvbClearTermListCache', 10, 3);
-
-function jvbClearTermListCache(int $term_id, int $tt_id, string $taxonomy):void
-{
-    // Check if this taxonomy has a corresponding list
-    $types = jvbGlobalDirectoryInfo();
-    foreach ($types as $type) {
-        if ($type['slug'] === $taxonomy) {
-            // Delete the option to force regeneration
-            delete_option(BASE . $type['slug'] . '_list');
-            break;
-        }
-    }
-
-    // If this is a city and it's linked to other taxonomies, clear those too
-    if ($taxonomy === BASE.'city') {
-        foreach ($types as $type) {
-            if (!empty($type['links']) && in_array(BASE.'_city', $type['links'])) {
-                delete_option(BASE . $type['slug'] . '_list');
-            }
-        }
-    }
-}
-
-/**
- * Clear list caches when post types are saved
- */
-add_action('save_post', 'jvbClearListCache', 10, 2);
-function jvbClearListCache(int $post_id, \WP_Post $post):void
-{
-	// SAFETY: Skip attachments and other non-content post types
-	if (in_array($post->post_type, jvbIgnoredPostTypes())) {
-		return;
-	}
-	if (jvbNoSaveIt($post_id, $post)) {
-		return;
-	}
-
-    // Get post type
-    $post_type = get_post_type($post_id);
-
-    // Check if this post type has a corresponding list
-    $types = jvbGlobalDirectoryInfo();
-    foreach ($types as $type) {
-        if ($type['slug'] === $post_type) {
-            // Delete the option to force regeneration
-            delete_option(BASE . $type['slug'] . '_list');
-            break;
-        }
-    }
-}
-
-
-/**
  * @param int $artistID
  * @param string $taxonomy
  *

--
Gitblit v1.10.0