Skip to content

Commit

Permalink
Remove core render_block filter for adding class to markup
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Mar 4, 2024
1 parent cc0e881 commit 7719742
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/block-supports/elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,6 @@ function gutenberg_render_elements_class_name( $block_content, $block ) {
// Remove WordPress core filters to avoid rendering duplicate elements stylesheet & attaching classes twice.
remove_filter( 'render_block', 'wp_render_elements_support', 10, 2 );
remove_filter( 'pre_render_block', 'wp_render_elements_support_styles', 10, 2 );
remove_filter( 'render_block', 'wp_render_elements_class_name', 10, 2 );
add_filter( 'render_block', 'gutenberg_render_elements_class_name', 10, 2 );
add_filter( 'render_block_data', 'gutenberg_render_elements_support_styles', 10, 2 );

0 comments on commit 7719742

Please sign in to comment.