Skip to content

Commit

Permalink
Remove Gutenberg's core block styles
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 27, 2023
1 parent 56e7a48 commit d10db2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ All features are activated by default when the plugin is activated.
- Discourage search engines from indexing in non-production environments
- Remove contributor, subscriber and author roles
- Remove Gutenberg's front-end block styles
- Remove Gutenberg's core block styles
- Remove Gutenberg's global styles
- Remove Gutenberg's SVG filters
- Remove classic theme styles
Expand Down
11 changes: 10 additions & 1 deletion headache.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Description: An easy-to-swallow painkiller plugin for WordPress.
* Author: Vincent Klaiber
* Author URI: https://github.com/vinkla
* Version: 3.3.0
* Version: 3.3.1
* Plugin URI: https://github.com/vinkla/headache
* GitHub Plugin URI: vinkla/headache
*/
Expand Down Expand Up @@ -157,6 +157,15 @@ function remove_block_styles(): void

add_action('wp_enqueue_scripts', __NAMESPACE__ . '\\remove_block_styles');

// Remove core block styles.
// https://github.com/WordPress/gutenberg/issues/56065
function remove_core_block_styles(): void
{
wp_dequeue_style('core-block-supports');
}

add_action('wp_footer', __NAMESPACE__ . '\\remove_core_block_styles');

// Remove Gutenberg's global styles.
// https://github.com/WordPress/gutenberg/pull/34334#issuecomment-911531705
function remove_global_styles(): void
Expand Down

0 comments on commit d10db2c

Please sign in to comment.