Skip to content

Instantly share code, notes, and snippets.

@justintadlock
Created June 24, 2021 01:43
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 justintadlock/694d9e71b1fe3bf0036b919b8592b43a to your computer and use it in GitHub Desktop.
Save justintadlock/694d9e71b1fe3bf0036b919b8592b43a to your computer and use it in GitHub Desktop.
<?php
$block_styles = [
'core/button' => [
'fill-white' => __( 'Fill White', 'frost' ),
'outline-white' => __( 'Outline White', 'frost' )
]
];
foreach ( $block_styles as $block => $styles ) {
foreach ( $styles as $name => $label ) {
register_block_style( $block, [
'name' => $name,
'label' => $label
] );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment