From c06013234d16ab3889bd7fce09f6606b45fd2b9f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 23:38:14 +0000
Subject: [PATCH] Merge branch 'main' of https://github.com/jakevdwerf/jvb

---
 inc/rest/routes/ContentRoutes.php |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/inc/rest/routes/ContentRoutes.php b/inc/rest/routes/ContentRoutes.php
index e1b457a..468a1a7 100644
--- a/inc/rest/routes/ContentRoutes.php
+++ b/inc/rest/routes/ContentRoutes.php
@@ -36,7 +36,7 @@
     {
         $this->cache_name = 'user_content_'.get_current_user_id();
         parent::__construct();
-
+		$this->cache->clear();
         $this->action = 'dash-';
         $this->operation_type = 'content_update';
         add_filter(BASE.'handle_bulk_operation', [$this, 'processOperation'], 10, 3);
@@ -261,6 +261,16 @@
 		if (Features::forContent($post_type)->has('is_calendar'))  {
 			$args = $this->applyCalendarFilters($args, $params);
 		}
+		$taxonomies = array_filter($params, function($param) {
+			return str_starts_with($param, 'tax_');
+		}, ARRAY_FILTER_USE_KEY);
+		if (!empty($taxonomies)) {
+			$params['taxonomies'] = [];
+			foreach ($taxonomies as $taxonomy => $terms) {
+				$taxonomy = str_replace('tax_', '', $taxonomy);
+				$params['taxonomies'][$taxonomy] = $terms;
+			}
+		}
 		if (array_key_exists('taxonomies', $params)) {
 			$args = $this->applyTaxonomyFilters($args, $params);
 		}
@@ -287,7 +297,6 @@
 
 
         $cache = $this->cache->get($key);
-		$cache = false;
         if ($cache) {
             $response = new WP_REST_Response($cache);
 			return $this->addCacheHeaders($response);
@@ -835,6 +844,7 @@
             $data['images'] = $images;
         }
 
+		error_log('Got Data for post: '.print_r($data, true));
         return $data;
     }
 	protected function extractImages(array $fields = []):array
@@ -863,7 +873,7 @@
 		return $images;
 	}
 
-	protected function formatTimeline(WP_Post $post):array
+	public function formatTimeline(WP_Post $post):array
 	{
 		$item = $this->prepareItem($post, true, false);
 		//Step 1: Get the fields that apply to all posts

--
Gitblit v1.10.0