Skip to content

Instantly share code, notes, and snippets.

@richtabor
Created March 10, 2020 01:07
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 richtabor/8f67c310151c62f4c314755cef45aa70 to your computer and use it in GitHub Desktop.
Save richtabor/8f67c310151c62f4c314755cef45aa70 to your computer and use it in GitHub Desktop.
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