From 3e6b45360db3366e2ecbc817d4ff967c6a9870ab Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 4 Jan 2019 20:26:38 +0000 Subject: [PATCH] Script Loader: Load unminified package vendor scripts when `SCRIPT_DEBUG` is set. The unminified package vendor scripts are bundled with the release package thus the value of the `SCRIPT_DEBUG` constant should be honored. Props earnjam. See #45535. git-svn-id: https://develop.svn.wordpress.org/trunk@44391 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 83ac6af1ad..7f745acffd 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -76,7 +76,7 @@ function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) { function wp_default_packages_vendor( &$scripts ) { global $wp_locale; - $dev_suffix = wp_scripts_get_suffix( 'dev' ); + $suffix = wp_scripts_get_suffix(); $vendor_scripts = array( 'react' => array( 'wp-polyfill' ), @@ -108,7 +108,7 @@ function wp_default_packages_vendor( &$scripts ) { $dependencies = array(); } - $path = "/wp-includes/js/dist/vendor/$handle$dev_suffix.js"; + $path = "/wp-includes/js/dist/vendor/$handle$suffix.js"; $version = $vendor_scripts_versions[ $handle ]; $scripts->add( $handle, $path, $dependencies, $version, 1 );