Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created February 5, 2019 21:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/753899c9007d3a0eb0a9f6d6bdaca607 to your computer and use it in GitHub Desktop.
Save billerickson/753899c9007d3a0eb0a9f6d6bdaca607 to your computer and use it in GitHub Desktop.
wp.domReady( () => {
wp.blocks.unregisterBlockStyle( 'core/button', 'default' );
wp.blocks.unregisterBlockStyle( 'core/button', 'outline' );
wp.blocks.unregisterBlockStyle( 'core/button', 'squared' );
} );
<?php
/**
* Gutenberg scripts and styles
* @see https://www.billerickson.net/wordpress-color-palette-button-styling-gutenberg
*/
function be_gutenberg_scripts() {
wp_enqueue_script( 'be-editor', get_stylesheet_directory_uri() . '/assets/js/editor.js', array( 'wp-blocks', 'wp-dom' ), filemtime( get_stylesheet_directory() . '/assets/js/editor.js' ), true );
}
add_action( 'enqueue_block_editor_assets', 'be_gutenberg_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment