Skip to content

Draft: Prevent .wp-container-... styles and classes on frontend, and add block core settings filtering for editor and frontend.

Dan Westmancoat requested to merge feat/v3-filter-core-block-settings into granola-v3

Allows us to programmatically filter core block settings, like setting support for __experimentalLayout to false.

I'm not sure if I've missed something on why this isn't manageable with theme.json like we do with support for colourpickers on core blocks. Potentially because it's an __experimental setting..?

The remove_filter('render_block', 'wp_render_layout_support_flag... is to prevent WP spitting out unnecessary styles (in the footer) and classes (on core blocks with supports > __experimentalLayout enabled) — this was happening on the front end.

Edited by Dan Westmancoat

Merge request reports