Make WordPress Core


Ignore:
Timestamp:
02/09/2024 06:20:12 PM (15 months ago)
Author:
youknowriad
Message:

Editor: Update the WordPress packages to Gutenberg 17.7RC1.

This brings the latest and greatest from Gutenberg.
The full changelog is available here
https://github.com/WordPress/gutenberg/releases/tag/v17.7.0-rc.1

Props youknowriad, get_dave.
See #60315.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/file.php

    r57377 r57578  
    3939    // If it's interactive, enqueue the script module and add the directives.
    4040    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        );
    4152        wp_enqueue_script_module( '@wordpress/block-library/file' );
    4253
     
    6374        )
    6475    );
    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     );
    7276}
    7377add_action( 'init', 'register_block_core_file' );
Note: See TracChangeset for help on using the changeset viewer.