Skip to content

Commit 23ffd70

Browse files
committed
Revert "Block Processor: Fix is_block_type() for inner HTML"
This reverts commit 5ba6bd5.
1 parent 25e4907 commit 23ffd70

1 file changed

Lines changed: 8 additions & 20 deletions

File tree

src/wp-includes/class-wp-block-processor.php

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -630,15 +630,8 @@ public function __construct( string $source_text ) {
630630
*/
631631
public function next_block( ?string $block_type = null ): bool {
632632
while ( $this->next_delimiter( $block_type ) ) {
633-
switch ( $this->get_delimiter_type() ) {
634-
case self::OPENER:
635-
case self::VOID:
636-
return true;
637-
638-
case null:
639-
if ( '*' === $block_type ) {
640-
return true;
641-
}
633+
if ( self::CLOSER !== $this->get_delimiter_type() ) {
634+
return true;
642635
}
643636
}
644637

@@ -1447,17 +1440,12 @@ public function is_block_type( string $block_type ): bool {
14471440
return true;
14481441
}
14491442

1450-
if ( $this->is_html() ) {
1451-
// This is a core/freeform text block, it’s special.
1452-
if ( 0 === ( $this->open_blocks_length[0] ?? null ) ) {
1453-
return (
1454-
'core/freeform' === $block_type ||
1455-
'freeform' === $block_type
1456-
);
1457-
}
1458-
1459-
// Otherwise this is innerHTML and not a block.
1460-
return false;
1443+
// This is a core/freeform text block, it’s special.
1444+
if ( $this->is_html() && 0 === ( $this->open_blocks_length[0] ?? null ) ) {
1445+
return (
1446+
'core/freeform' === $block_type ||
1447+
'freeform' === $block_type
1448+
);
14611449
}
14621450

14631451
return $this->are_equal_block_types( $this->source_text, $this->namespace_at, $this->name_at - $this->namespace_at + $this->name_length, $block_type, 0, strlen( $block_type ) );

0 commit comments

Comments
 (0)