Custom plugin to manage WordPress Gutenberg blocks.
In ucla-ps-block-types.js
unregister block slugs to disable them from the editor.
To disable unsupported blocks...
If block slug is core/columns
then add unregisterBlockType
wp.blocks.unregisterBlockType( 'core/columns' );
wp.blocks.unregisterBlockType( 'core/latest-comments' );
To find out name of a block slug, view source and get name from data-type element.
Two hooks introduced to WordPress specifically for enqueueing block assets.
enqueue_block_editor_assets
– This can be used to enqueue block scripts and styles in the admin editor only.enqueue_block_assets
– This is used to enqueue block scripts and styles in both the admin editor and frontend of the site.
For more info, view 2018 blog post by Jason YingLing