From ddcf09ace3be95beda75122d1295b148aab4c57d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 7 Aug 2020 16:51:06 +0000 Subject: [PATCH] Script Loader: Add a temporary `jquery-migrate-compat-5.5` script handle. This is intended as an easy way for plugins and themes to still be able to load jQuery with jQuery Migrate in WordPress 5.5. Once jQuery is updated to 3.x, this temporary script handle will be removed. This means plugins and themes still using it at that point will fail to load their scripts (as a dependency will be missing), but will not cause "fatal errors" breaking the rest of JS. Follow-up to [48323], [48324]. Props azaozz, desrosj, apedog, Clorith, jorbin. Fixes #37110. Built from https://develop.svn.wordpress.org/trunk@48753 git-svn-id: http://core.svn.wordpress.org/trunk@48515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 5725269a9c..2b229fce11 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -723,6 +723,11 @@ function wp_default_scripts( $scripts ) { $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' ); $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' ); + // Backward compatibility: Makes it easy for plugins and themes to enqueue jQuery with jQuery Migrate in WordPress 5.5. + // Note: This script handle will most likely be removed in WordPress 5.6 or when jQuery is updated to the latest version. + // Then plugins and themes that are still relying on it will stop functioning. + $scripts->add( 'jquery-migrate-compat-5.5', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4-wp' ); + // Full jQuery UI. $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); $scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 12a2db2e07..26c8460388 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48751'; +$wp_version = '5.6-alpha-48753'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.