From a6413da67a4579866f0fd0323ddb23a7b6b9654a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 18 Sep 2026 17:00:53 +0000
Subject: [PATCH] =Cleaning up the Integrations setup a bit, started the Helcim integration work too
---
inc/blocks/_setup.php | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/inc/blocks/_setup.php b/inc/blocks/_setup.php
index cdae9f1..761ad88 100644
--- a/inc/blocks/_setup.php
+++ b/inc/blocks/_setup.php
@@ -1,11 +1,12 @@
<?php
+use JVBase\blocks\CustomBlocks;
use JVBase\registrar\Registrar;
use JVBase\base\Site;
//require(JVB_DIR . '/inc/blocks/RegisterBlocks.php');
require(JVB_DIR . '/inc/blocks/CustomBlocks.php');
-
+CustomBlocks::getInstance();
add_action('init', 'jvb_conditionally_load_blocks', 1);
function jvb_conditionally_load_blocks(): void
@@ -20,17 +21,17 @@
new JVBase\blocks\MenuBlock();
}
- if (!empty(Registrar::getFeatured('is_faq'))) {
+ if (!empty(Registrar::withFeature('is_faq'))) {
require('FAQBlock.php');
new JVBase\blocks\FAQBlock();
}
- if (!empty(Registrar::getFeatured('is_glossary'))) {
+ if (!empty(Registrar::withFeature('is_glossary'))) {
require('GlossaryBlock.php');
new JVBase\blocks\GlossaryBlock();
}
- if (!empty(Registrar::getFeatured('is_timeline'))) {
+ if (!empty(Registrar::withFeature('is_timeline'))) {
require('TimelineBlock.php');
new JVBase\blocks\TimelineBlock();
}
@@ -47,7 +48,7 @@
// ]
// );
// }
-// if (!empty(Registrar::getFeatured('show_directory'))) {
+// if (!empty(Registrar::withFeature('show_directory'))) {
// error_log('Registering Directory List Block');
// register_block_type(
// JVB_DIR . '/build/list',
@@ -57,9 +58,25 @@
// );
// }
+ register_block_type(
+ JVB_DIR . '/build/meta',
+ [
+ 'render_callback' => 'jvbRenderMetaBlock'
+ ]
+ );
+
+ if (!empty(Registrar::withFeature('is_calendar'))) {
+ require('EventBlock.php');
+ new JVBase\blocks\EventBlock();
+ }
+
}
+require('SimpleCalendarBlock.php');
+new JVBase\blocks\SimpleCalendarBlock();
+
+
require('SummaryBlock.php');
new JVBase\blocks\SummaryBlock();
--
Gitblit v1.10.0