From 86c6cd3cc099d2480932ede03c12cea01e625c94 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 21:56:28 +0000
Subject: [PATCH] =Requiring files based on Site class settings
---
inc/helpers/ui.php | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/inc/helpers/ui.php b/inc/helpers/ui.php
index 7a0b191..c9a5c1f 100644
--- a/inc/helpers/ui.php
+++ b/inc/helpers/ui.php
@@ -1,7 +1,7 @@
<?php
use JVBase\meta\Form;
-use JVBase\utility\Features;
+use JVBase\base\Site;
use JVBase\utility\Image;
if (!defined('ABSPATH')) {
@@ -13,7 +13,7 @@
function jvbClientQueue():void
{
- if (!Features::forSite()->has('dashboard') || !is_user_logged_in()) {
+ if (!Site::has('dashboard') || !is_user_logged_in()) {
return;
}
@@ -111,7 +111,8 @@
*/
function jvbNotificationMenu():string
{
- if (jvbSiteHasNotifications() && is_user_logged_in()) {
+ $membership = Site::membership();
+ if ($membership && $membership->has('notifications') && is_user_logged_in()) {
ob_start();
?>
@@ -158,7 +159,7 @@
*/
function jvbHelpMenu():string
{
- if (!Features::forSite()->has('helpMenu')) {
+ if (!Site::has('helpMenu')) {
return '';
}
$out = get_option(BASE.'help_menu');
@@ -297,15 +298,13 @@
?>
<nav id="<?=$id?>" class="on-this-page index">
- <label>Jump to:
- <button type="button" aria-label="Show Index" title="Show Index" class="toggle" aria-expanded="false">
- <?= jvbIcon('plus-square') ?>
- </button>
- </label>
+ <button type="button" aria-label="Show Index" title="Show Index" class="toggle main" aria-expanded="false">
+ <span>Jump To:</span><?= jvbIcon('plus-square') ?>
+ </button>
<ul>
- <li>
+ <li id="back-to-top">
<a href="#top" title="Back to Top">
- <?= jvbIcon('caret-circle-up') ?>
+ <?= jvbIcon('caret-circle-up') ?><span>Back to Top</span>
</a>
</li>
<?php
--
Gitblit v1.10.0