From 235ce5716edc2f7cbe80fdccf26eac7269587839 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 08 Jun 2026 04:38:18 +0000
Subject: [PATCH] =FavouritesManager.php and FavouritesRoutes.php fixes. Moving all logic to FavouritesManager.php. Still some left to do
---
inc/rest/routes/FeedRoutes.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/inc/rest/routes/FeedRoutes.php b/inc/rest/routes/FeedRoutes.php
index 6abb894..f4e0ab1 100644
--- a/inc/rest/routes/FeedRoutes.php
+++ b/inc/rest/routes/FeedRoutes.php
@@ -501,7 +501,7 @@
: explode(',', $args['post_type']);
// Check if filtering global feed content
- if (in_array(jvbNoBase($context['type']), Registrar::getFeatured('is_content', 'term'))) {
+ if (in_array(jvbNoBase($context['type']), Registrar::withFeature('is_content', 'term'))) {
// Global: show posts from any content type with this taxonomy
$for_content = Registrar::getInstance($context['type'])->registrar->for ?? [];
@@ -509,7 +509,7 @@
$post_types = array_map(fn($type) => jvbCheckBase($type), $for_content);
// Filter to only show_feed content types
- $show_feed_types = Registrar::getFeatured('show_feed', 'post');
+ $show_feed_types = Registrar::withFeature('show_feed', 'post');
$args['post_type'] = array_intersect(
$post_types,
array_map(fn($type) => jvbCheckBase($type), $show_feed_types)
@@ -1147,7 +1147,7 @@
$config = [];
// Get content types with show_feed
- $contentTypes = Registrar::getFeatured('show_feed', 'post');
+ $contentTypes = Registrar::withFeature('show_feed', 'post');
foreach ($contentTypes as $slug) {
$this->cache->tag('content:'.$slug);
$registrar = Registrar::getInstance($slug);
@@ -1163,7 +1163,7 @@
}
// Get taxonomies with show_feed (content taxonomies)
- $taxonomies = Registrar::getFeatured('show_feed', 'term');
+ $taxonomies = Registrar::withFeature('show_feed', 'term');
foreach ($taxonomies as $slug) {
$registrar = Registrar::getInstance($slug);
if (!$registrar || !($registrar->hasFeature('is_content') ?? false)) {
--
Gitblit v1.10.0