From 5b5f37de365ff84fc231e414a719d1b2ff4ceff6 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 22:38:58 +0000
Subject: [PATCH] =further feed block testing

---
 inc/rest/routes/FeedRoutes.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/inc/rest/routes/FeedRoutes.php b/inc/rest/routes/FeedRoutes.php
index 3b9799e..2d9265f 100644
--- a/inc/rest/routes/FeedRoutes.php
+++ b/inc/rest/routes/FeedRoutes.php
@@ -249,6 +249,9 @@
 			$item['taxonomies'] = array_merge($item['taxonomies'], $this->extractTaxonomies($f, $postID, jvbNoBase($post->post_type)));
 			$images[$f['post_thumbnail']] = jvbImageData((int) $f['post_thumbnail']);
 		}
+		$item['fields']['number'] = count($children);
+		$item['fields']['before'] = get_post_thumbnail_id($children[0]);
+		$item['fields']['after'] = get_post_thumbnail_id($children[array_key_last($children)]);
 
 		$item['fields']['timeline'] = $subFields;
 		$item['images'] = $item['images'] + $images;
@@ -258,7 +261,7 @@
 	protected function extractTaxonomies(array $fields, int $postID, string $content):array {
 		$taxonomies = [];
 		foreach ($fields as $key => $value) {
-			if (array_key_exists($key, JVB_TAXONOMY)) {
+			if (array_key_exists($key, JVB_TAXONOMY) && (array_key_exists('public', JVB_TAXONOMY[$key]) && JVB_TAXONOMY[$key]['public']!== false)) {
 				$terms = array_map('absint', explode(',',$value));
 				foreach($terms as $termID) {
 					$term = get_term($termID, jvbCheckBase($key));

--
Gitblit v1.10.0