mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Fix the admin toolbar js when jQuery is not present and replace the jQuery based hoverIntent.js with a native implementation. Introduces the "hoverintent" (no dependencies) package.
Props dinhtungdu, audrasjb, azaozz. Fixes #47069. git-svn-id: https://develop.svn.wordpress.org/trunk@46872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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( 'hoverintent-js' ), false, 1 );
|
||||
|
||||
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize(
|
||||
@@ -1515,6 +1515,9 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array( 'jquery' ), '1.8.1', 1 );
|
||||
|
||||
// JS-only version of hoverintent (no dependencies).
|
||||
$scripts->add( 'hoverintent-js', "/wp-includes/js/hoverintent-js.min.js", array(), '2.2.1', 1 );
|
||||
|
||||
$scripts->add( 'customize-base', "/wp-includes/js/customize-base$suffix.js", array( 'jquery', 'json2', 'underscore' ), false, 1 );
|
||||
$scripts->add( 'customize-loader', "/wp-includes/js/customize-loader$suffix.js", array( 'customize-base' ), false, 1 );
|
||||
$scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'wp-a11y', 'customize-base' ), false, 1 );
|
||||
|
||||
Reference in New Issue
Block a user