From a0a037db4d30a747af93d02bce37120254ca0b4a Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 8 Oct 2019 17:21:13 +0000 Subject: [PATCH] Accessibility: Script Loader: Add jQuery as dependency of `admin-bar`. On the front end, themes that don't use jQuery make the admin bar fallback to the non-jQuery implementation. Some important features miss from the non-jQuery `admin-bar.js` part, for example `hoverintent` and, most importantly, the touch events for the mobile menu don't work at all. Enqueueing jQuery is the simplest option for now. For the future, a complete rewriting of `admin-bar.js` in plain JavaScript is highly recommended. See #47069. Built from https://develop.svn.wordpress.org/trunk@46440 git-svn-id: http://core.svn.wordpress.org/trunk@46238 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 9744c3a610..997dd2e9be 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1490,7 +1490,7 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 ); - $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); + $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array( 'jquery' ), false, 1 ); $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); did_action( 'init' ) && $scripts->localize( diff --git a/wp-includes/version.php b/wp-includes/version.php index ff307b9316..4f35f0c82f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-beta2-46439'; +$wp_version = '5.3-beta2-46440'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.