| | |
| | | <?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 |
| | |
| | | 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(); |
| | | } |
| | |
| | | // ] |
| | | // ); |
| | | // } |
| | | // 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', |
| | |
| | | // ); |
| | | // } |
| | | |
| | | 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(); |
| | | |