Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (20 loc) · 592 Bytes

hooks.md

File metadata and controls

27 lines (20 loc) · 592 Bytes

Hooks

How to disable CSS for a single block

gutenberg_cloud_disable_style

Disable blocks styling for single block:

add_filter( 'gutenberg_cloud_disable_style', 'disable_custom_blocks_styles', 10, 2);
function disable_custom_blocks_styles( $exclude, $block ) {
	if ( $block->package_name == '@frontkom/g-content-in-columns') {
		return true;
	}
	return false;
}

Or disable for all custom blocks:

add_filter( 'gutenberg_cloud_disable_style', 'disable_custom_blocks_styles', 10, 2);
function disable_custom_blocks_styles( $exclude, $block ) {
	return true;
}