Last active
July 28, 2019 14:05
-
-
Save phpbits/ed9f7372ac5a8a2408fd10c9d10ebe9a to your computer and use it in GitHub Desktop.
Create custom image block style variations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp.domReady( () => { | |
wp.blocks.registerBlockStyle( 'core/image', { | |
name: 'default', | |
label: __( 'Default' ), | |
isDefault: true, | |
} ); | |
wp.blocks.registerBlockStyle( 'core/image', { | |
name: 'circular-image', | |
label: __( 'Circular' ), | |
isDefault: false, | |
} ); | |
wp.blocks.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