Ticket #25161: 25161.patch
| File 25161.patch, 2.0 KB (added by , 12 years ago) |
|---|
-
Gruntfile.js
17 17 }, 18 18 copy: { 19 19 all: { 20 options: { 21 processContent: function( src, filepath ) { 22 if ( filepath.indexOf( 'wp-settings.php' ) > -1 ) { 23 src = src.replace( /\/\/ Removed when building the release\s+/, '' ) 24 .replace( /if \( ! defined\( 'SCRIPT_DEBUG' \) \)\s+/, '' ) 25 .replace( /define\( 'SCRIPT_DEBUG', true \);\s+/, '' ); 26 27 if ( src.indexOf( 'SCRIPT_DEBUG' ) > -1 ) { 28 grunt.fail.fatal('Failed to remove SCRIPT_DEBUG from wp-settings.php');; 29 } 30 } 31 32 return src; 33 }, 34 processContentExclude: SOURCE_DIR + '*/**' // Don't process files in sub-directories 35 }, 20 36 dot: true, 21 37 expand: true, 22 38 cwd: SOURCE_DIR, -
src/wp-includes/script-loader.php
57 57 $scripts->default_version = get_bloginfo( 'version' ); 58 58 $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/'); 59 59 60 if ( ! defined( 'SCRIPT_DEBUG' ) ) 61 define( 'SCRIPT_DEBUG', ! file_exists( ABSPATH . WPINC . '/js/wp-util.min.js' ) ); 60 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 62 61 63 $suffix = SCRIPT_DEBUG ? '' : '.min';64 65 62 $scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" ); 66 63 did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array( 67 64 'url' => (string) SITECOOKIEPATH, -
src/wp-settings.php
15 15 * 16 16 * @since 1.0.0 17 17 */ 18 19 // Removed when building the release 20 if ( ! defined( 'SCRIPT_DEBUG' ) ) 21 define( 'SCRIPT_DEBUG', true ); 22 18 23 define( 'WPINC', 'wp-includes' ); 19 24 20 25 // Include files required for initialization.