| | |
| | | <?php |
| | | |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\utility\Features; |
| | | use JVBase\base\Site; |
| | | |
| | | //require(JVB_DIR . '/inc/blocks/RegisterBlocks.php'); |
| | | require(JVB_DIR . '/inc/blocks/CustomBlocks.php'); |
| | | |
| | | if (Features::forSite()->has('feed_block')) { |
| | | if (Site::has('feed_block')) { |
| | | require(JVB_DIR . '/inc/blocks/FeedBlock.php'); |
| | | new JVBase\blocks\FeedBlock(); |
| | | } |
| | | |
| | | if (Features::forSite()->has('is_restaurant')) { |
| | | if (Site::has('is_restaurant')) { |
| | | require(JVB_DIR . '/inc/blocks/MenuBlock.php'); |
| | | new JVBase\blocks\MenuBlock(); |
| | | } |
| | | |
| | | if (Features::forSite()->has('faq')) { |
| | | if (Site::has('faq')) { |
| | | require(JVB_DIR . '/inc/blocks/FAQBlock.php'); |
| | | new JVBase\blocks\FAQBlock(); |
| | | } |
| | | |
| | | |
| | | if (!empty(Registrar::getFeatured('is_gallery'))) { |
| | | if (!empty(Registrar::getFeatured('is_glossary'))) { |
| | | require(JVB_DIR . '/inc/blocks/GlossaryBlock.php'); |
| | | new JVBase\blocks\GlossaryBlock(); |
| | | } |
| | | |
| | | if (!empty(Registrar::getFeatured('is_timeline'))) { |
| | | require(JVB_DIR . '/inc/blocks/TimelineBlock.php'); |
| | | new JVBase\blocks\TimelineBlock(); |
| | | } |
| | | |
| | | require(JVB_DIR . '/inc/blocks/SummaryBlock.php'); |
| | | new JVBase\blocks\SummaryBlock(); |
| | | |
| | |
| | | } |
| | | add_filter('block_categories_all', 'jvbRegisterBlockCategory'); |
| | | |
| | | if (Features::hasIntegration('gmb')) { |
| | | if (Site::hasIntegration('gmb')) { |
| | | require(JVB_DIR . '/build/gmbreviews/render.php'); |
| | | } |
| | | function jvbRegisterBlocks():void |
| | | { |
| | | if (Features::hasIntegration('gmb')) { |
| | | if (Site::hasIntegration('gmb')) { |
| | | register_block_type( |
| | | JVB_DIR . '/build/gmbreviews', |
| | | [ |