Enable block
-
Hi,
We use this code in our function.php to disable blocks that we don’t need in the editor:
function example_allowed_block_types( $allowed_block_types, $block_editor_context ) {$allowed_block_types = array(
‘core/list’,
‘core/list-item’,
‘core/paragraph’,
‘generateblocks/button’,
‘generateblocks/grid’,
‘generateblocks/headline’,
‘generateblocks/image’,
‘generateblocks/query-loop’,);
return $allowed_block_types;
}
add_filter( ‘allowed_block_types_all’, ‘example_allowed_block_types’, 10, 2 );/**
- Globally disable the Block Directory.
*/
remove_action( ‘enqueue_block_editor_assets’, ‘wp_enqueue_editor_block_directory_assets’ );
But now the Flexible Table block is gone. Can you give me the code to show the Flexible Table block?
- Globally disable the Block Directory.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.