Disable Specific Blocks for the Block Editor

If you would like to remove certain blocks from even showing in the block editor, Six/Ten Press Block Editor can help you disable them. You give it the list of blocks you want to disable, and the plugin does the rest, regardless of whether they’re registered using PHP or JavaScript. Here’s an example:

add_filter( 'sixtenpressblockeditor_disable_blocks', 'leaven_disallowed_blocks' );
 * Define the blocks we are disallowing.
 * @return array
function leaven_disallowed_blocks( $blocks ) {
	return array_merge( 
}Code language: PHP (php)
Return to Six/Ten Press Block Editor