if ( function_exists( 'register_block_style' ) ) { | |
function prefix_register_block_styles() { | |
/** | |
* Register stylesheet | |
*/ | |
wp_register_style( | |
'prefix-stylesheet', | |
plugins_url( 'style.css', __FILE__ ), | |
array(), | |
'1.0.0' | |
); | |
/** | |
* Register block style | |
*/ | |
register_block_style( | |
'core/image', | |
array( | |
'name' => 'glitch', | |
'label' => '__( 'Glitch Filter', 'coblocks' )', | |
'style_handle' => 'prefix-stylesheet', | |
) | |
); | |
} | |
add_action( 'init', 'prefix_register_block_styles' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment