From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.

---
 inc/managers/Notifications/EmailDigests.php |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/inc/managers/Notifications/EmailDigests.php b/inc/managers/Notifications/EmailDigests.php
index 978ff7f..841ffaf 100644
--- a/inc/managers/Notifications/EmailDigests.php
+++ b/inc/managers/Notifications/EmailDigests.php
@@ -18,8 +18,6 @@
 class EmailDigests
 {
 	protected string $campaign;
-	protected Cache $terms;
-	protected Cache $users;
 	protected CustomTable $userIndex;
 	protected CustomTable $termIndex;
 	public function __construct()
@@ -45,7 +43,7 @@
 		protected function registerUserIndex():void
 		{
 			$table = CustomTable::for('user_notification_email_digest');
-//		$types = implode(',',array_map(function($item) { return "'{$item}'"; }, Registrar::getFeatured('favouritable')));
+//		$types = implode(',',array_map(function($item) { return "'{$item}'"; }, Registrar::withFeature('favouritable')));
 			$table->setColumns([
 				'id'			=> 'bigint(20) unsigned NOT NULL AUTO_INCREMENT',
 				'user_id'		=> "{$table->getUserIDType()} NOT NULL",
@@ -73,7 +71,7 @@
 		protected function registerTermIndex():void
 		{
 			$table = CustomTable::for('user_notification_email_digest');
-			$types = implode(',',array_map(function($item) { return "'{$item}'"; }, Registrar::getFeatured('favouritable', 'term')));
+			$types = implode(',',array_map(function($item) { return "'{$item}'"; }, Registrar::withFeature('favouritable', 'term')));
 			$table->setColumns([
 				'id'			=> 'bigint(20) unsigned NOT NULL AUTO_INCREMENT',
 				'term_id'		=> "{$table->getTermIDType()} NOT NULL",
@@ -189,8 +187,8 @@
 		$content = '';
 		foreach ($subscription as $item) {
 			$temp = match ($item['item_type']) {
-				array_merge(['user'], Registrar::getFeatured('favouritable', 'user')) => $this->getUserUpdates($item['item_id'], $frequency),
-				Registrar::getFeatured('favouritable', 'term') => $this->getTermUpdates($item['item_id'], $item['item_type'], $frequency),
+				array_merge(['user'], Registrar::withFeature('favouritable', 'user')) => $this->getUserUpdates($item['item_id'], $frequency),
+				Registrar::withFeature('favouritable', 'term') => $this->getTermUpdates($item['item_id'], $item['item_type'], $frequency),
 				default => false,
 			};
 			if ($temp) {

--
Gitblit v1.10.0