plugin updates
This commit is contained in:
@@ -19,18 +19,7 @@
|
||||
function render_block_core_file( $attributes, $content ) {
|
||||
// If it's interactive, enqueue the script module and add the directives.
|
||||
if ( ! empty( $attributes['displayPreview'] ) ) {
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||
$module_url = gutenberg_url( '/build/interactivity/file.min.js' );
|
||||
}
|
||||
|
||||
wp_register_script_module(
|
||||
'@wordpress/block-library/file',
|
||||
isset( $module_url ) ? $module_url : includes_url( "blocks/file/view{$suffix}.js" ),
|
||||
array( '@wordpress/interactivity' ),
|
||||
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
||||
);
|
||||
wp_enqueue_script_module( '@wordpress/block-library/file' );
|
||||
wp_enqueue_script_module( '@wordpress/block-library/file/view' );
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( $content );
|
||||
$processor->next_tag();
|
||||
|
||||
Reference in New Issue
Block a user