Skip to content

Instantly share code, notes, and snippets.

@zgordon
Created December 28, 2017 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zgordon/5ef1b8de2fc258b93bb2881e67d8731e to your computer and use it in GitHub Desktop.
Save zgordon/5ef1b8de2fc258b93bb2881e67d8731e to your computer and use it in GitHub Desktop.
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