Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress whitelist Gutenberg blocks
<?php
/**
* Block whitelist
* Only allow certain blocks to be used
*/
add_filter( 'allowed_block_types', 'our_allowed_block_types' );
function our_allowed_block_types( $allowed_blocks ) {
return array(
'core/image',
'core/paragraph',
'core/heading',
'core/list',
'core/media-text',
'core/quote',
'core/group',
'core/button',
'acf/hero',
'acf/utility',
'acf/testimonials'
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.