Skip to content

Commit

Permalink
Stop unmarking children of interactive blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Dec 25, 2023
1 parent 425ebdb commit ec22d09
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Expand Up @@ -74,18 +74,6 @@ public static function mark_children_of_interactive_block( $block ) {
self::$children_of_interactive_block[] = md5( serialize( $block ) );
}

/**
* Removes a reference to a direct children of an interactive block.
*
* @param array $block The block to remove.
*/
public static function unmark_children_of_interactive_block( $block ) {
$key = array_search( md5( serialize( $block ) ), self::$children_of_interactive_block, true );
if ( false !== $key ) {
unset( self::$children_of_interactive_block[ $key ] );
}
}

/**
* Checks if block is marked as children of an interactive block.
*
Expand Down
6 changes: 0 additions & 6 deletions lib/experimental/interactivity-api/directive-processing.php
Expand Up @@ -99,12 +99,6 @@ function gutenberg_mark_block_interactivity( $block_content, $block, $block_inst
isset( $block_instance->block_type->supports['interactivity'] ) &&
$block_instance->block_type->supports['interactivity']
) {
if ( isset( $block['innerBlocks'] ) ) {
foreach ( $block['innerBlocks'] as $inner_block ) {
WP_Directive_Processor::unmark_children_of_interactive_block( $inner_block );
}
}

// Wraps the interactive block with a comment delimiter to be able to
// process it later.
return get_comment_delimited_block_content(
Expand Down

0 comments on commit ec22d09

Please sign in to comment.