mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Block Editor: Fix the WordPress packages and vendor script registration.
The version is set properly and the scripts are automatically loaded in the footer. This patch also includes a revert for the reusable blocks enqueue script. Props pento, swissspidy, youknowriad. Merges [43942] into trunk. Fixes #45402. See #45396. git-svn-id: https://develop.svn.wordpress.org/trunk@44277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -111,7 +111,7 @@ function wp_default_packages_vendor( &$scripts ) {
|
||||
$path = "/wp-includes/js/dist/vendor/$handle$dev_suffix.js";
|
||||
$version = $vendor_scripts_versions[ $handle ];
|
||||
|
||||
$scripts->add( $handle, $path, $dependencies, false, $version );
|
||||
$scripts->add( $handle, $path, $dependencies, $version, 1 );
|
||||
}
|
||||
|
||||
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) );
|
||||
@@ -466,7 +466,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
||||
$path = "/wp-includes/js/dist/$package$suffix.js";
|
||||
$version = $packages_versions[ $package ];
|
||||
|
||||
$scripts->add( $handle, $path, $dependencies, false, $version );
|
||||
$scripts->add( $handle, $path, $dependencies, $version, 1 );
|
||||
|
||||
if ( isset( $package_translations[ $package ] ) ) {
|
||||
$scripts->set_translations( $handle, $package_translations[ $package ] );
|
||||
|
||||
Reference in New Issue
Block a user