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
This commit is contained in:
Andrea Fercia 2019-10-08 17:21:13 +00:00
parent 760a55b310
commit a0a037db4d
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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.