How to whitelist Carousel Block with allowed_block_types_all

In case you’re going to only allow specific blocks on your project, and you’re using allowed_block_types_all for that (read my tutorial about it), then in order to allow Carousel block you have to specify not only its block slug but also a slug of its child block.

Example:

add_filter( 'allowed_block_types_all', function( $allowed_blocks ) {
 
	return array(
		'core/paragaph',
		'code/embed',
		'rudr/carousel', // carousel block
		'rudr/slide', // slide block
	);
	
} );

The result:

how to whitelist carousel block with allowed_block_types_all fitler hook
Only the blocks listed in allowed_block_types_all are displaying in Inserter now. Also the Carousel block is fully functional.