Changeset 57578 for trunk/src/wp-includes/blocks/file.php
- Timestamp:
- 02/09/2024 06:20:12 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/file.php
r57377 r57578 39 39 // If it's interactive, enqueue the script module and add the directives. 40 40 if ( ! empty( $attributes['displayPreview'] ) ) { 41 $suffix = wp_scripts_get_suffix(); 42 if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { 43 $module_url = gutenberg_url( '/build/interactivity/file.min.js' ); 44 } 45 46 wp_register_script_module( 47 '@wordpress/block-library/file', 48 isset( $module_url ) ? $module_url : includes_url( "blocks/file/view{$suffix}.js" ), 49 array( '@wordpress/interactivity' ), 50 defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' ) 51 ); 41 52 wp_enqueue_script_module( '@wordpress/block-library/file' ); 42 53 … … 63 74 ) 64 75 ); 65 66 wp_register_script_module(67 '@wordpress/block-library/file',68 defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/file.min.js' ) : includes_url( 'blocks/file/view.min.js' ),69 array( '@wordpress/interactivity' ),70 defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )71 );72 76 } 73 77 add_action( 'init', 'register_block_core_file' );
Note: See TracChangeset
for help on using the changeset viewer.