Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The registerBlockType() function takes two parameters: name and settings.
// Get registerBlockType() from wp.blocks in the global scope
const { registerBlockType } = window.wp.blocks;
// Two parameters, name and settings
registerBlockType( 'example-plugin/example-custom-block', {} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment