Ticket #32793: 32793.2.diff
File 32793.2.diff, 2.8 KB (added by , 9 years ago) |
---|
-
Gruntfile.js
diff --git a/Gruntfile.js b/Gruntfile.js index c592bb0..3725ac6 100644
a b module.exports = function(grunt) { 478 478 BUILD_DIR + 'wp-includes/js/wp-emoji.min.js' 479 479 ], 480 480 dest: BUILD_DIR + 'wp-includes/js/wp-emoji-release.min.js' 481 }, 482 jquery: { 483 options: { 484 separator: '\n', 485 process: function( src, filepath ) { 486 return '// Source: ' + filepath.replace( BUILD_DIR, '' ) + '\n' + src; 487 } 488 }, 489 src: [ 490 BUILD_DIR + 'wp-includes/js/jquery/jquery.js', 491 BUILD_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' 492 ], 493 dest: BUILD_DIR + 'wp-includes/js/jquery/jquery-release.min.js' 481 494 } 482 495 }, 483 496 compress: { … … module.exports = function(grunt) { 635 648 'clean:tinymce', 636 649 'concat:emoji', 637 650 'includes:emoji', 638 'jsvalidate:build' 651 'jsvalidate:build', 652 'concat:jquery' 639 653 ] ); 640 654 641 655 // Testing tasks. -
src/wp-includes/script-loader.php
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 287a23e..e134f14 100644
a b function wp_default_scripts( &$scripts ) { 184 184 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop') ); 185 185 186 186 // jQuery 187 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.11.3' ); 188 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.11.3' ); 189 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.2.1' ); 187 // When SCRIPT_DEBUG is true, jQuery and jQuery-migrate are loaded as seperate files 188 // When SCRIPT_DEBUG is false, a combined version of the two files are loaded to reduce HTTP requests 189 // For the purposes of cache busting, the release (combined) version number is a cancatination of the 190 // version numbers of the original files 191 $jquery_version = '1.11.3'; 192 $jquery_migrate_version = '1.2.1'; 193 $jquery_release_version = 'core' . $jquery_version . '-migrate' . $jquery_migrate_version; 194 if ( true == SCRIPT_DEBUG ) { 195 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), $jquery_version ); 196 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), $jquery_version ); 197 $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), $jquery_migrate_version ); 198 } 199 else { 200 $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery-release.min.js', array(), $jquery_release_version ); 201 $scripts->add( 'jquery-core', false, array( 'jquery' ), $jquery_version, 1 ); 202 $scripts->add( 'jquery-migrate', false, array( 'jquery' ), $jquery_migrate_version, 1 ); 203 } 190 204 191 205 // full jQuery UI 192 206 $scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11.4', 1 );