Disabling All Blocks, Block Editor
It may come in handy when you only want to let your users/clients use Patterns only…
add_filter('allowed_block_types_all', 'disable_all_core_blocks', 10, 2); function disable_all_core_blocks($allowed_blocks, $post) { return array(); // Return an empty array to disable all core blocks }