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/DashboardManager.php | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/inc/managers/DashboardManager.php b/inc/managers/DashboardManager.php
index 395e6c2..bb671e8 100644
--- a/inc/managers/DashboardManager.php
+++ b/inc/managers/DashboardManager.php
@@ -641,7 +641,10 @@
}
}
- return $icon;
+ return match($icon) {
+ 'favourites' => 'heart',
+ default => $icon
+ };
});
}
protected function getSlug(string $slug, string $page):string
@@ -744,7 +747,7 @@
//content types
$all = array_merge(
Registrar::getRegistered('post'),
- Registrar::getFeatured('is_content', 'term')
+ Registrar::withFeature('is_content', 'term')
);
$availableContent = array_filter($pages, function($page, $key) use($all) {
return !is_numeric($key) && in_array($key, $all) && JVB()->roles()->checkRole($this->user, $key);
@@ -1091,7 +1094,7 @@
<?php
$i=1;
$content = Registrar::getRegistered('post');
- $contentTax = Registrar::getFeatured('is_content', 'term');
+ $contentTax = Registrar::withFeature('is_content', 'term');
$taxonomies = Registrar::getRegistered('term');
foreach($contentTax as $index => $tax) {
unset($taxonomies[$index]);
@@ -1284,7 +1287,7 @@
$pages[] = 'Favourites';
}
- if (!empty(Registrar::getFeatured('karma'))) {
+ if (!empty(Registrar::withFeature('karma'))) {
$pages[] = 'Karmic Score';
}
@@ -1451,7 +1454,7 @@
foreach ($roles as $role) {
$contents = Registrar::getInstance($role)?->getCreatable();
if (!empty($contents)) {
- $hasKarma = Registrar::getFeatured('karma');
+ $hasKarma = Registrar::withFeature('karma');
$remove = empty(array_intersect($contents, $hasKarma));
}
}
@@ -1512,7 +1515,7 @@
*/
protected function getRolesWithDashboard():array
{
- return Registrar::getFeatured('has_dashboard', 'user');
+ return Registrar::withFeature('has_dashboard', 'user');
}
/**
--
Gitblit v1.10.0