From bf7a1614695417a7827ea610c3f59a44dacf350a Mon Sep 17 00:00:00 2001 From: Marin Atanasov Date: Tue, 25 Jul 2023 15:46:26 +0300 Subject: [PATCH] Experimental: Backend handle freeform blocks with TinyMCE removal --- lib/experimental/disable-tinymce.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/experimental/disable-tinymce.php b/lib/experimental/disable-tinymce.php index cfe716d834ff7..ff9185cff567d 100644 --- a/lib/experimental/disable-tinymce.php +++ b/lib/experimental/disable-tinymce.php @@ -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; } }