Skip to content

Instantly share code, notes, and snippets.

@richtabor richtabor/styles.php Secret
Created Mar 10, 2020

Embed
What would you like to do?
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
You can’t perform that action at this time.