Skip to content

Instantly share code, notes, and snippets.

@phpbits phpbits/block-styles.js
Last active Jul 28, 2019

Embed
What would you like to do?
Create Custom Image Block Styles
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const { registerBlockStyle } = wp.blocks;
registerBlockStyle( 'core/image' , {
name: 'default',
label: __( 'Default' ),
isDefault: true,
});
registerBlockStyle( 'core/image', {
name: 'circular-image',
label: __( 'Circular' ),
isDefault: false,
});
registerBlockStyle( 'core/image', {
name: 'rounded-corners',
label: __( 'Rounded Corners' ),
isDefault: false,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.