Skip to content

Commit

Permalink
File: Mark the block as an island to activate directives
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed May 5, 2023
1 parent ca1b15d commit 335e9f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/experimental/interactivity-api/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function gutenberg_block_core_file_add_directives_to_content( $block_content, $b
}
$processor = new WP_HTML_Tag_Processor( $block_content );
$processor->next_tag();
$processor->set_attribute( 'data-wp-island', '' );
$processor->set_attribute( 'data-wp-init', 'effects.core.file.init' );
return $processor->get_updated_html();
}
Expand Down

0 comments on commit 335e9f8

Please sign in to comment.