Created
March 11, 2020 17:55
-
-
Save davidallenlewis/4404afb635683f9b3916abc47714254d to your computer and use it in GitHub Desktop.
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
// ******************************* | |
// Blocks Availability | |
// ------------------------------- | |
add_filter( 'allowed_block_types', 'uwd_allowed_block_types', 10, 2 ); | |
function uwd_allowed_block_types( $allowed_blocks, $post ) { | |
$allowed_blocks = array( | |
// ACF Blocks | |
'acf/accordion', | |
'acf/archive-cards', | |
'acf/archive-carousel', | |
'acf/archive-list', | |
'acf/aside', | |
'acf/banner', | |
'acf/form', | |
'acf/gallery', | |
'acf/header', | |
'acf/hero', | |
'acf/icon', | |
'acf/intro', | |
'acf/image', | |
'acf/map', | |
'acf/testimonial', | |
'acf/video', | |
// Core | |
'core/block', | |
'core-embed/facebook', | |
'core-embed/instagram', | |
'core-embed/twitter', | |
'core-embed/youtube', | |
'core/columns', | |
'core/heading', | |
'core/image', | |
'core/list', | |
'core/paragraph', | |
'core/spacer', | |
//'core/table', | |
); | |
return $allowed_blocks; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment