diff --git a/index.php b/index.php index c6f55fb..708c828 100644 --- a/index.php +++ b/index.php @@ -52,7 +52,14 @@ function create_block_multiblocks_block_init() register_block_type(__DIR__ . '/blocks/chapitrage-thematique/build'); register_block_type(__DIR__ . '/blocks/timeline/build'); register_block_type(__DIR__ . '/blocks/staff-list/build'); + register_block_type(__DIR__ . '/blocks/section-titling/build'); + + // CONTAINERS (STATIC) register_block_type(__DIR__ . '/blocks/grey-box/build'); + register_block_type(__DIR__ . '/blocks/white-box/build'); + + // CHILDREN (STATIC) + register_block_type(__DIR__ . '/blocks/monoblock/build'); // — ALLOWED IN GREYBOX / WHITE BOX // register_block_type(__DIR__ . '/blocks/_starterNested/build'); } @@ -164,6 +171,22 @@ function homegrade_allowed_block_types($allowed_blocks, $editor_context) } + + +function wpdocs_allowed_block_types($block_editor_context, $editor_context) +{ + if (!empty($editor_context->post)) { + return array( + 'core/paragraph', + 'core/heading', + 'core/list', + ); + } + + return $block_editor_context; +} + +// add_filter('allowed_block_types_all', 'wpdocs_allowed_block_types', 10, 2); /* ------------------------------------- POST TYPE TEMPLATES -------------------------------------*/