From 0dfe1d8afafc59c4a5559c498342668d5a58d6ef Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 23 Jul 2026 22:41:41 +0000
Subject: [PATCH] =Still working away at the Integrations overhaul
---
checks.php | 33 ++++++++++++++++-----------------
1 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/checks.php b/checks.php
index 6b55711..25e4f80 100644
--- a/checks.php
+++ b/checks.php
@@ -1,5 +1,6 @@
<?php
+use JVBase\base\Options;
use JVBase\base\Site;
use JVBase\managers\Cache;
use JVBase\registrar\Registrar;
@@ -14,26 +15,24 @@
function jvbUserTypes():array
{
- return Registrar::getFeatured('profile_link', 'user');
+ return Registrar::withFeature('profile_link', 'user');
}
-//function jvbIsOpen():bool
-//{
-//
-// if (!jvbCheck('limit_hours', JVB_SITE)) {
-// return true;
-// }
-// if (get_option(BASE.'open_to_public') !== '1') {
-// return false;
-// }
-// //Check if today_hours is set
-// if (get_option(BASE.'today_hours')) {
-// return jvbIsTimeBetween();
-// }
-// //Default to the stored settings
-// return jvbIsCurrentlyOpen();
-//}
+
+function jvbIsOpen():bool
+{
+ if (!Site::has('limit_hours')) {
+ return true;
+ }
+ if (Options::get('open_to_public') !== '1') {
+ return false;
+ }
+ if (!empty(Options::get('today_hours'))) {
+ return jvbIsTimeBetween();
+ }
+ return jvbIsCurrentlyOpen();
+}
function jvbTermHasPosts(int $termID, string $taxonomy):bool
--
Gitblit v1.10.0