| | |
| | | new JVBase\blocks\MenuBlock(); |
| | | } |
| | | |
| | | if (Features::forSite()->has('faq') || array_key_exists('faq', JVB_CONTENT)) { |
| | | require(JVB_DIR . '/inc/blocks/FAQBlock.php'); |
| | | new JVBase\blocks\FAQBlock(); |
| | | } |
| | | |
| | | |
| | | if (Features::anyContentHas('is_gallery')) { |
| | | require(JVB_DIR . '/inc/blocks/GlossaryBlock.php'); |
| | | new JVBase\blocks\GlossaryBlock(); |
| | | } |
| | | if (Features::anyContentHas('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')) { |
| | | require(JVB_DIR . '/build/gmbreviews/render.php'); |
| | | } |
| | | function jvbRegisterBlocks():void |
| | | { |
| | | if (Features::hasIntegration('gmb')) { |
| | | register_block_type( |
| | | JVB_DIR . '/build/gmbreviews', |
| | | [ |
| | | 'render_callback' => 'jvbRenderGMBReviewsBlock' |
| | | ]); |
| | | } |
| | | // if (jvbSiteUsesFeedBlock()) { |
| | | // register_block_type( |
| | | // JVB_DIR . '/build/feed', |
| | | // [ |
| | | // 'render_callback' => 'jvbRenderFeedBlock' |
| | | // ] |
| | | // ); |
| | | // } |
| | | if (Features::anyContentHas('show_directory') || Features::anyTaxonomyHas('show_directory')) { |
| | | register_block_type( |
| | | JVB_DIR . '/build/list', |
| | | [ |
| | | 'render_callback' => 'jvbRenderListBlock' |
| | | ] |
| | | ); |
| | | } |
| | | register_block_type( |
| | | JVB_DIR . '/build/drawer-menu', |
| | | ); |
| | | } |
| | | add_action('init', 'jvbRegisterBlocks'); |