Last active
September 23, 2019 07:29
-
-
Save ivo-ivanov/7409221a27c034c14dc98bce7db2a08b to your computer and use it in GitHub Desktop.
Disable all default gutenberg block types and allow custom blocks #wordpress #gutenberg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Disable all default block types and allow custom blocks | |
add_filter( 'allowed_block_types', 'show_only_custom_blocks' ); | |
function show_only_custom_blockss( $allowed_blocks ) { | |
return array( | |
'custom-block-category/text', | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment