Skip to content

Instantly share code, notes, and snippets.

@thexavismith
Created September 8, 2022 17:43
Show Gist options
  • Save thexavismith/f759a1d8210f8f8ff1dc5d8acbd10520 to your computer and use it in GitHub Desktop.
Save thexavismith/f759a1d8210f8f8ff1dc5d8acbd10520 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'allowed_block_types_all', $n( 'allowed_block_types_all' ) );
/**
* Allowlist of blocks in the Gutenberg editor.
*
* @param array $allowed_blocks List of blocks that are allowed
* @return array Allowed list of blocks
*/
function allowed_block_types_all( $allowed_blocks ) {
return array(
'core/image',
'core/paragraph',
'core/heading',
'core/list',
'core/buttons',
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment