Skip to content

Commit

Permalink
Experimental: Backend handle freeform blocks with TinyMCE removal (#5…
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Jul 26, 2023
1 parent b0fb1c2 commit d17cd9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/experimental/disable-tinymce.php
Expand Up @@ -87,7 +87,8 @@ function_exists( 'use_block_editor_for_post_type' ) &&

$parsed_blocks = parse_blocks( $content );
foreach ( $parsed_blocks as $block ) {
if ( empty( $block['blockName'] ) && strlen( trim( $block['innerHTML'] ) ) > 0 ) {
$is_freeform_block = empty( $block['blockName'] ) || 'core/freeform' === $block['blockName'];
if ( $is_freeform_block && strlen( trim( $block['innerHTML'] ) ) > 0 ) {
return true;
}
}
Expand Down

0 comments on commit d17cd9c

Please sign in to comment.