-
diff --git package-lock.json package-lock.json
index 477488d18a..68dc453454 100644
|
|
|
6502 | 6502 | } |
6503 | 6503 | }, |
6504 | 6504 | "jquery": { |
6505 | | "version": "1.12.4", |
6506 | | "resolved": "https://registry.npmjs.org/jquery/-/jquery-1.12.4.tgz", |
6507 | | "integrity": "sha1-AeHfuikP5z3rp3zurLD5ui/sngw=" |
| 6505 | "version": "3.3.1", |
| 6506 | "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz", |
| 6507 | "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==" |
6508 | 6508 | }, |
6509 | 6509 | "jquery-color": { |
6510 | 6510 | "version": "github:jquery/jquery-color#95402e5b2f1184ab2de7014aeef0a90f2bee0a40", |
… |
… |
|
6527 | 6527 | } |
6528 | 6528 | }, |
6529 | 6529 | "jquery-migrate": { |
6530 | | "version": "1.4.1", |
6531 | | "resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-1.4.1.tgz", |
6532 | | "integrity": "sha1-hRUvPsmalWJfT30Lz2LpuGOPWnY=", |
| 6530 | "version": "3.0.1", |
| 6531 | "resolved": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.0.1.tgz", |
| 6532 | "integrity": "sha512-NYlhcFnRh4Bv9jvadPlcAKQdVGRE0+TSgFYxQ+ZnCxUUHbwd+SjbOg+Xvu1Oea9mpQJ+2VB1eCfcBORWNQsHaA==", |
6533 | 6533 | "dev": true |
6534 | 6534 | }, |
6535 | 6535 | "jquery-ui": { |
-
diff --git package.json package.json
index 96aa92a301..06a4c70525 100644
|
|
|
39 | 39 | "grunt-sass": "2.0.0", |
40 | 40 | "grunt-webpack": "^3.0.2", |
41 | 41 | "ink-docstrap": "^1.3.0", |
42 | | "jquery-migrate": "1.4.1", |
| 42 | "jquery-migrate": "3.0.1", |
43 | 43 | "matchdep": "~1.0.0", |
44 | 44 | "webpack": "^3.6.0", |
45 | 45 | "webpack-dev-server": "^2.9.1" |
… |
… |
|
47 | 47 | "dependencies": { |
48 | 48 | "backbone": "1.3.3", |
49 | 49 | "imagesloaded": "3.2.0", |
50 | | "jquery": "1.12.4", |
| 50 | "jquery": "3.3.1", |
51 | 51 | "jquery-color": "github:jquery/jquery-color#2.1.1", |
52 | 52 | "jquery-form": "4.2.1", |
53 | 53 | "jquery-hoverintent": "1.8.3", |
-
diff --git src/js/_enqueues/admin/user-profile.js src/js/_enqueues/admin/user-profile.js
index e95a42844e..36eef04869 100644
|
|
|
339 | 339 | }); |
340 | 340 | |
341 | 341 | if ( select.length ) { |
342 | | $('#first_name, #last_name, #nickname').bind( 'blur.user_profile', function() { |
| 342 | $('#first_name, #last_name, #nickname').on( 'blur.user_profile', function() { |
343 | 343 | var dub = [], |
344 | 344 | inputs = { |
345 | 345 | display_nickname : $('#nickname').val() || '', |
-
diff --git src/js/_enqueues/admin/xfn.js src/js/_enqueues/admin/xfn.js
index 9933592e9f..0830f1e602 100644
|
|
|
5 | 5 | */ |
6 | 6 | jQuery( document ).ready(function( $ ) { |
7 | 7 | $( '#link_rel' ).prop( 'readonly', true ); |
8 | | $( '#linkxfndiv input' ).bind( 'click keyup', function() { |
| 8 | $( '#linkxfndiv input' ).on( 'click keyup', function() { |
9 | 9 | var isMe = $( '#me' ).is( ':checked' ), inputs = ''; |
10 | 10 | $( 'input.valinp' ).each( function() { |
11 | 11 | if ( isMe ) { |
-
diff --git src/js/_enqueues/deprecated/media-gallery.js src/js/_enqueues/deprecated/media-gallery.js
index a71d8fe17f..2d29cfe95e 100644
|
|
jQuery(function($) { |
8 | 8 | /** |
9 | 9 | * Adds a click event handler to the element with a 'wp-gallery' class. |
10 | 10 | */ |
11 | | $( 'body' ).bind( 'click.wp-gallery', function(e) { |
| 11 | $( 'body' ).on( 'click.wp-gallery', function(e) { |
12 | 12 | var target = $( e.target ), id, img_size; |
13 | 13 | |
14 | 14 | if ( target.hasClass( 'wp-set-header' ) ) { |
-
diff --git src/js/_enqueues/lib/nav-menu.js src/js/_enqueues/lib/nav-menu.js
index a121aa8b1e..7aea727606 100644
|
|
var wpNavMenu; |
1050 | 1050 | }; |
1051 | 1051 | } else { |
1052 | 1052 | // Make the post boxes read-only, as they can't be used yet |
1053 | | $( '#menu-settings-column' ).find( 'input,select' ).end().find( 'a' ).attr( 'href', '#' ).unbind( 'click' ); |
| 1053 | $( '#menu-settings-column' ).find( 'input,select' ).end().find( 'a' ).attr( 'href', '#' ).off( 'click' ); |
1054 | 1054 | } |
1055 | 1055 | }, |
1056 | 1056 | |
-
diff --git src/js/_enqueues/lib/pointer.js src/js/_enqueues/lib/pointer.js
index a6b13c7fa5..7fe3bafa83 100644
|
|
|
20 | 20 | var close = ( wpPointerL10n ) ? wpPointerL10n.dismiss : 'Dismiss', |
21 | 21 | button = $('<a class="close" href="#">' + close + '</a>'); |
22 | 22 | |
23 | | return button.bind( 'click.pointer', function(e) { |
| 23 | return button.on( 'click.pointer', function(e) { |
24 | 24 | e.preventDefault(); |
25 | 25 | t.element.pointer('close'); |
26 | 26 | }); |
-
diff --git src/js/_enqueues/vendor/plupload/handlers.js src/js/_enqueues/vendor/plupload/handlers.js
index 28d2072fb1..eccee645b4 100644
|
|
jQuery(document).ready(function($){ |
426 | 426 | |
427 | 427 | uploader = new plupload.Uploader(wpUploaderInit); |
428 | 428 | |
429 | | $('#image_resize').bind('change', function() { |
| 429 | $('#image_resize').on('change', function() { |
430 | 430 | var arg = $(this).prop('checked'); |
431 | 431 | |
432 | 432 | setResize( arg ); |
-
diff --git src/js/_enqueues/wp/api.js src/js/_enqueues/wp/api.js
index 9ac12fe889..6a6347c565 100644
|
|
|
390 | 390 | if ( ! getModel.get( embedCheckField ) ) { |
391 | 391 | getModel.fetch( { |
392 | 392 | success: function( getModel ) { |
393 | | deferred.resolve( getModel ); |
| 393 | deferred.resolveWith( deferred, getModel ); |
394 | 394 | }, |
395 | 395 | error: function( getModel, response ) { |
396 | | deferred.reject( response ); |
| 396 | deferred.rejectWith( deferred, response ); |
397 | 397 | } |
398 | 398 | } ); |
399 | 399 | } else { |
400 | 400 | // Resolve with the embedded model. |
401 | | deferred.resolve( getModel ); |
| 401 | deferred.resolveWith( deferred, getModel ); |
402 | 402 | } |
403 | 403 | |
404 | 404 | // Return a promise. |
-
diff --git src/js/_enqueues/wp/customize/base.js src/js/_enqueues/wp/customize/base.js
index 374f50300e..9af48b8ffd 100644
|
|
window.wp = window.wp || {}; |
592 | 592 | }; |
593 | 593 | |
594 | 594 | this.bind( this.update ); |
595 | | this.element.bind( this.events, this.refresh ); |
| 595 | this.element.on( this.events, this.refresh ); |
596 | 596 | }, |
597 | 597 | |
598 | 598 | find: function( selector ) { |
-
diff --git src/js/_enqueues/wp/customize/controls.js src/js/_enqueues/wp/customize/controls.js
index ed75ba3df1..2bebc3cbe9 100644
|
|
|
1104 | 1104 | return; |
1105 | 1105 | } |
1106 | 1106 | |
1107 | | duration = ( 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 ); |
| 1107 | duration = ( api.previewer && 'resolved' === api.previewer.deferred.active.state() ? args.duration : 0 ); |
1108 | 1108 | |
1109 | 1109 | if ( construct.extended( api.Panel ) ) { |
1110 | 1110 | // If this is a panel is not currently expanded but another panel is expanded, do not animate. |
-
diff --git src/js/_enqueues/wp/customize/nav-menus.js src/js/_enqueues/wp/customize/nav-menus.js
index db846baaf2..3d477e5c7b 100644
|
|
|
221 | 221 | }); |
222 | 222 | |
223 | 223 | // Load available items if it looks like we'll need them. |
224 | | api.panel( 'nav_menus' ).container.bind( 'expanded', function() { |
| 224 | api.panel( 'nav_menus' ).container.on( 'expanded', function() { |
225 | 225 | if ( ! self.rendered ) { |
226 | 226 | self.initList(); |
227 | 227 | self.rendered = true; |
-
diff --git src/js/_enqueues/wp/util.js src/js/_enqueues/wp/util.js
index 6ffa97dcca..3cc2858c7d 100644
|
|
window.wp = window.wp || {}; |
85 | 85 | options = _.defaults( options || {}, { |
86 | 86 | type: 'POST', |
87 | 87 | url: wp.ajax.settings.url, |
88 | | context: this |
| 88 | context: this, |
| 89 | dataType: 'script' |
89 | 90 | }); |
90 | 91 | |
91 | 92 | deferred = $.Deferred( function( deferred ) { |
-
diff --git src/wp-admin/includes/class-wp-internal-pointers.php src/wp-admin/includes/class-wp-internal-pointers.php
index a2194df686..5778ac3562 100644
|
|
final class WP_Internal_Pointers { |
135 | 135 | }; |
136 | 136 | |
137 | 137 | if ( options.position && options.position.defer_loading ) |
138 | | $(window).bind( 'load.wp-pointers', setup ); |
| 138 | $(window).on( 'load.wp-pointers', setup ); |
139 | 139 | else |
140 | | $(document).ready( setup ); |
| 140 | $(document)on( 'ready', setup ); |
141 | 141 | |
142 | 142 | })( jQuery ); |
143 | 143 | </script> |
-
diff --git src/wp-content/themes/twentyfourteen/js/slider.js src/wp-content/themes/twentyfourteen/js/slider.js
index 1a08c6263a..ac4966b6f1 100644
|
|
|
72 | 72 | |
73 | 73 | // KEYBOARD |
74 | 74 | if ( $( slider.containerSelector ).length === 1 ) { |
75 | | $( document ).bind( 'keyup', function( event ) { |
| 75 | $( document ).on( 'keyup', function( event ) { |
76 | 76 | var keycode = event.keyCode, |
77 | 77 | target = false; |
78 | 78 | if ( ! slider.animating && ( keycode === 39 || keycode === 37 ) ) { |
… |
… |
|
92 | 92 | methods.touch(); |
93 | 93 | } |
94 | 94 | |
95 | | $( window ).bind( 'resize orientationchange focus', methods.resize ); |
| 95 | $( window ).on( 'resize orientationchange focus', methods.resize ); |
96 | 96 | |
97 | 97 | slider.find( 'img' ).attr( 'draggable', 'false' ); |
98 | 98 | }, |
… |
… |
|
423 | 423 | slider.animating = false; |
424 | 424 | slider.currentSlide = slider.animatingTo; |
425 | 425 | } |
426 | | slider.container.unbind( 'webkitTransitionEnd transitionend' ); |
427 | | slider.container.bind( 'webkitTransitionEnd transitionend', function() { |
| 426 | slider.container.off( 'webkitTransitionEnd transitionend' ); |
| 427 | slider.container.on( 'webkitTransitionEnd transitionend', function() { |
428 | 428 | slider.wrapup( dimension ); |
429 | 429 | } ); |
430 | 430 | } else { |
-
diff --git src/wp-content/themes/twentyseventeen/assets/js/customize-controls.js src/wp-content/themes/twentyseventeen/assets/js/customize-controls.js
index e6f6037a4d..38cfff4afe 100644
|
|
|
6 | 6 | */ |
7 | 7 | |
8 | 8 | (function() { |
9 | | wp.customize.bind( 'ready', function() { |
| 9 | wp.customize.on( 'ready', function() { |
10 | 10 | |
11 | 11 | // Only show the color hue control when there's a custom color scheme. |
12 | 12 | wp.customize( 'colorscheme', function( setting ) { |
-
diff --git src/wp-content/themes/twentyseventeen/assets/js/navigation.js src/wp-content/themes/twentyseventeen/assets/js/navigation.js
index f0fd65249a..df98e17019 100644
|
|
|
93 | 93 | }); |
94 | 94 | |
95 | 95 | } else { |
96 | | siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.twentyseventeen' ); |
| 96 | siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).off( 'touchstart.twentyseventeen' ); |
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
-
diff --git src/wp-content/themes/twentysixteen/js/functions.js src/wp-content/themes/twentysixteen/js/functions.js
index 8610561355..d87930d458 100644
|
|
|
94 | 94 | } |
95 | 95 | } ); |
96 | 96 | } else { |
97 | | siteNavigation.find( '.menu-item-has-children > a' ).unbind( 'touchstart.twentysixteen' ); |
| 97 | siteNavigation.find( '.menu-item-has-children > a' ).off( 'touchstart.twentysixteen' ); |
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
-
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index 12421811b6..22e08bf3bd 100644
|
|
function wp_default_scripts( &$scripts ) { |
207 | 207 | $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop' ) ); |
208 | 208 | |
209 | 209 | // jQuery |
210 | | $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' ); |
211 | | $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' ); |
| 210 | $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.0.0' ); |
| 211 | $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '3.2.1' ); |
| 212 | $scripts->add( 'jquery-legacy', '/wp-includes/js/jquery/jquery-legacy.js', array(), '1.12.4' ); |
212 | 213 | $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' ); |
213 | 214 | |
214 | 215 | // full jQuery UI |
-
diff --git tests/qunit/index.html tests/qunit/index.html
index 594d9e0ea4..d799aa8b45 100644
|
|
|
13 | 13 | <script> |
14 | 14 | window._wpUtilSettings = { |
15 | 15 | 'ajax': { |
16 | | 'url': '\/wp-admin\/admin-ajax.php' |
| 16 | 'url': 'http:\/\/localhost\/wp-admin\/admin-ajax.php' |
17 | 17 | } |
18 | 18 | }; |
19 | 19 | </script> |
-
diff --git tests/qunit/wp-admin/js/customize-controls.js tests/qunit/wp-admin/js/customize-controls.js
index 47ab5c0203..867c5a5a5c 100644
|
|
wp.customize.settingConstructor.abbreviation = wp.customize.Setting.extend({ |
6 | 6 | } |
7 | 7 | }); |
8 | 8 | |
9 | | jQuery( window ).load( function (){ |
| 9 | jQuery( window ).on( 'load', function (){ |
10 | 10 | 'use strict'; |
11 | 11 | |
12 | 12 | var controlId, controlLabel, controlType, controlContent, controlDescription, controlData, mockControl, |
-
diff --git tests/qunit/wp-admin/js/customize-nav-menus.js tests/qunit/wp-admin/js/customize-nav-menus.js
index 3ac6da8662..ab8d6642b6 100644
|
|
|
1 | 1 | /* global wp */ |
2 | | jQuery( window ).load( function (){ |
| 2 | jQuery( window ).on( 'load', function (){ |
3 | 3 | |
4 | 4 | var api = wp.customize, |
5 | 5 | primaryMenuId = 3, |
… |
… |
jQuery( window ).load( function (){ |
79 | 79 | control = section.controls()[0]; |
80 | 80 | ok( control.extended( api.Menus.MenuNameControl ), 'control is a MenuNameControl' ); |
81 | 81 | equal( control.setting().name, 'Primary menu' ); |
82 | | ok( ! control.setting._dirty ); |
| 82 | ok( ! control.setting.dirty, 'control not dirty' ); |
83 | 83 | control.container.find( 'input[type=text]:first' ).val( 'Main menu' ).trigger( 'change' ); |
84 | 84 | equal( control.setting().name, 'Main menu' ); |
85 | | ok( control.setting._dirty ); |
| 85 | ok( control.setting.dirty, 'control dirty' ); |
86 | 86 | } ); |
87 | 87 | // @todo Add more tests for api.Menus.MenuNameControl |
88 | 88 | |
-
diff --git tests/qunit/wp-admin/js/customize-widgets.js tests/qunit/wp-admin/js/customize-widgets.js
index 5f754a497a..38bd093652 100644
|
|
|
1 | 1 | /* global wp */ |
2 | | jQuery( window ).load( function() { |
| 2 | jQuery( window ).on( 'load', function() { |
3 | 3 | |
4 | 4 | var api = wp.customize, $ = jQuery; |
5 | 5 | |