Skip to content

Instantly share code, notes, and snippets.

@interplaydesign
Created March 2, 2021 21:20
Show Gist options
  • Select an option

  • Save interplaydesign/969d2a08db29b2799bf4bbcd0c0850cd to your computer and use it in GitHub Desktop.

Select an option

Save interplaydesign/969d2a08db29b2799bf4bbcd0c0850cd to your computer and use it in GitHub Desktop.
Block Customization Plugin 3 js/core-block-customizations.js
/**
* Examples of registering custom styles for core blocks
* Can be targeted in our public javascript folder to add
* animation, elements, or svgs to it
*/
wp.blocks.registerBlockStyle( 'core/quote', {
name: 'fancy-quote',
label: 'Fancy Quote',
} );
wp.blocks.registerBlockStyle( 'core/paragraph', {
name: 'fancy-paragraph',
label: 'Fancy Paragraph',
} );
wp.blocks.registerBlockStyle( 'core/button', {
name: 'minimal-button',
label: 'Minimal Button',
} );
wp.blocks.registerBlockStyle( 'core/group', {
name: 'add-custom-element',
label: 'Add Custom Element',
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment