diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index a60bee0a3d..06f1906cb0 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -48,7 +48,10 @@ require( ABSPATH . WPINC . '/functions.wp-styles.php' ); * @param object $scripts WP_Scripts object. */ function wp_default_scripts( &$scripts ) { + include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version + if ( ! defined( 'SCRIPT_DEBUG' ) ) + define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) ); if ( ! $guessurl = site_url() ) { $guessed_url = true; @@ -60,9 +63,6 @@ function wp_default_scripts( &$scripts ) { $scripts->default_version = get_bloginfo( 'version' ); $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/'); - if ( ! defined( 'SCRIPT_DEBUG' ) ) - define( 'SCRIPT_DEBUG', ! file_exists( ABSPATH . WPINC . '/js/wp-util.min.js' ) ); - $suffix = SCRIPT_DEBUG ? '' : '.min'; $scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" ); @@ -531,6 +531,10 @@ function wp_default_scripts( &$scripts ) { * @param object $styles */ function wp_default_styles( &$styles ) { + include ABSPATH . WPINC . '/version.php'; // include an unmodified $wp_version + + if ( ! defined( 'SCRIPT_DEBUG' ) ) + define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) ); if ( ! $guessurl = site_url() ) $guessurl = wp_guess_url(); @@ -541,9 +545,6 @@ function wp_default_styles( &$styles ) { $styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr'; $styles->default_dirs = array('/wp-admin/', '/wp-includes/css/'); - if ( ! defined( 'SCRIPT_DEBUG' ) ) - define( 'SCRIPT_DEBUG', ! file_exists( ABSPATH . WPINC . '/js/wp-util.min.js' ) ); - $suffix = SCRIPT_DEBUG ? '' : '.min'; $rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls', 'media-views', 'wp-color-picker' ); diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index 1303224a4a..7bc1370bd8 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '3.7-beta1-25639'; +$wp_version = '3.7-beta1-25639-src'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.