diff --git a/lib/experimental/interactivity-api/blocks.php b/lib/experimental/interactivity-api/blocks.php deleted file mode 100644 index 3ad6d13d660fb..0000000000000 --- a/lib/experimental/interactivity-api/blocks.php +++ /dev/null @@ -1,234 +0,0 @@ -attributes['displayPreview'] ) ) { - return $block_content; - } - $processor = new WP_HTML_Tag_Processor( $block_content ); - $processor->next_tag(); - $processor->set_attribute( 'data-wp-island', '' ); - $processor->next_tag( 'object' ); - $processor->set_attribute( 'data-wp-bind.hidden', '!selectors.core.file.hasPdfPreview' ); - $processor->set_attribute( 'hidden', true ); - return $processor->get_updated_html(); -} -add_filter( 'render_block_core/file', 'gutenberg_block_core_file_add_directives_to_content', 10, 3 ); - -/** - * Add Interactivity API directives to the navigation block markup using the Tag Processor - * The final HTML of the navigation block will look similar to this: - * - * - * - * @param string $block_content Markup of the navigation block. - * - * @return string Navigation block markup with the proper directives - */ -function gutenberg_block_core_navigation_add_directives_to_markup( $block_content ) { - $w = new WP_HTML_Tag_Processor( $block_content ); - // Add directives to the `