From 772462eeca3002a1d52508aeba485aab2b4742ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 03 Mar 2026 19:06:19 +0000
Subject: [PATCH] =MAJOR OVERHAUL. Likely should have made a new branch ages ago. Key changes: Registrar.php is the base for custom post types, taxonomies, and user roles. Replaces JVB_CONTENT, JVB_TAXONOMY, and JVB_USER constants, eliminates most of Features.php (except for JVB_SITE, JVB_MEMBERSHIP), and has built in sanitizing and validation via sub-classes. Also started a major overhaul of the Schema output. Created a shit ton of property traits and classes to help sanitize and ensure proper data for different schema types. Still a bunch to do, but better to be starting committing changes here on this other branch.
---
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