Ticket #37110: 37110.11.diff
File 37110.11.diff, 7.5 KB (added by , 5 years ago) |
---|
-
package-lock.json
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": "sha 1-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": "sha 1-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": { -
package.json
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", -
src/js/_enqueues/wp/customize/controls.js
7094 7094 api.state.create( name ); 7095 7095 }); 7096 7096 7097 $( function() { 7097 /** 7098 * Function which boots the Customizer controls app. This should be done at DOMContentLoaded. 7099 * 7100 * @since 5.0 7101 */ 7102 api.ready = function ready() { 7098 7103 api.settings = window._wpCustomizeSettings; 7099 7104 api.l10n = window._wpCustomizeControlsL10n; 7100 7105 … … 9264 9269 9265 9270 body.addClass( 'ready' ); 9266 9271 api.trigger( 'ready' ); 9267 } );9272 }; 9268 9273 9269 9274 })( wp, jQuery ); -
src/wp-includes/script-loader.php
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' );212 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), ' 1.4.1' );210 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '3.3.1' ); 211 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '3.3.1' ); 212 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '3.0.1' ); 213 213 214 214 // full jQuery UI 215 215 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array( 'jquery' ), '1.11.4', 1 ); … … 582 582 $scripts->add( 'customize-models', '/wp-includes/js/customize-models.js', array( 'underscore', 'backbone' ), false, 1 ); 583 583 $scripts->add( 'customize-views', '/wp-includes/js/customize-views.js', array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 ); 584 584 $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util', 'jquery-ui-core' ), false, 1 ); 585 did_action( 'init' ) && $scripts->add_inline_script( 'customize-controls', 'document.addEventListener( "DOMContentLoaded", wp.customize.ready );' ); 585 586 did_action( 'init' ) && $scripts->localize( 586 587 'customize-controls', '_wpCustomizeControlsL10n', array( 587 588 'activate' => __( 'Activate & Publish' ), -
tests/qunit/index.html
77 77 <script src="../../build/wp-includes/js/customize-models.js"></script> 78 78 <script src="../../build/wp-includes/js/shortcode.js"></script> 79 79 <script src="../../build/wp-admin/js/customize-controls.js"></script> 80 <script> 81 document.addEventListener( 'DOMContentLoaded', wp.customize.ready ); 82 </script> 80 83 <script src="../../build/wp-includes/js/api-request.js"></script> 81 84 <script src="../../build/wp-includes/js/wp-api.js"></script> 82 85 -
tests/qunit/wp-admin/js/customize-controls.js
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, … … 430 430 settingId = 'new_blogname'; 431 431 settingValue = 'Hello World'; 432 432 433 test( 'Create a new setting', function () { 434 mockSetting = wp.customize.create( 433 function createMockSetting() { 434 if ( wp.customize.has( settingId ) ) { 435 return wp.customize( settingId ); 436 } 437 return wp.customize.create( 435 438 settingId, 436 439 settingId, 437 440 settingValue, … … 440 443 previewer: wp.customize.previewer 441 444 } 442 445 ); 446 } 447 448 test( 'Create a new setting', function () { 449 mockSetting = createMockSetting(); 443 450 equal( mockSetting(), settingValue ); 444 451 equal( mockSetting.id, settingId ); 445 452 } ); … … 546 553 mockControl.section( mockSection.id ); 547 554 equal( mockControl.section(), mockSection.id ); 548 555 }); 549 test( 'Associating a control with a section allows it to be embedded', function () { 550 equal( mockControl.deferred.embedded.state(), 'resolved' ); 556 test( 'Associating a control with a section allows it to be embedded', function ( assert ) { 557 createMockSetting(); // In case this test is being tested in isolation. 558 mockControl.section( mockSection.id ); 559 ok( wp.customize.has( 'new_blogname' ) ); 560 equal( mockControl.deferred.embedded.state(), 'resolved' ); // @todo Why is this not resolved? 551 561 }); 552 562 553 563 test( 'Control is now available on section.controls()', function () { -
tests/qunit/wp-admin/js/customize-nav-menus.js
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, -
tests/qunit/wp-admin/js/customize-widgets.js
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