Make WordPress Core

Changeset 32935


Ignore:
Timestamp:
06/25/2015 02:28:50 AM (10 years ago)
Author:
azaozz
Message:

Define SCRIPT_DEBUG early on every load, similarly to WP_DEBUG. Remove defined( 'SCRIPT_DEBUG' ) checks.
Fixes #32333.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r32899 r32935  
    543543                }
    544544
    545                 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     545                $suffix = SCRIPT_DEBUG ? '' : '.min';
    546546                $version = 'ver=' . $wp_version;
    547547                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
     
    11351135        );
    11361136
    1137         $suffix = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min';
     1137        $suffix = SCRIPT_DEBUG ? '' : '.min';
    11381138
    11391139        /**
  • trunk/src/wp-includes/default-constants.php

    r32800 r32935  
    7272        define('WP_CACHE', false);
    7373
     74    // Add define('SCRIPT_DEBUG', true); to wp-config.php to enable loading of non-minified,
     75    // non-concatenated scripts and stylesheets.
     76    if ( ! defined( 'SCRIPT_DEBUG' ) ) {
     77        if ( ! empty( $GLOBALS['wp_version'] ) ) {
     78            $develop_src = false !== strpos( $GLOBALS['wp_version'], '-src' );
     79        } else {
     80            $develop_src = false;
     81        }
     82
     83        define( 'SCRIPT_DEBUG', $develop_src );
     84    }
     85
    7486    /**
    7587     * Private
  • trunk/src/wp-includes/formatting.php

    r32900 r32935  
    42564256
    42574257    $version = 'ver=' . $wp_version;
    4258     $develop_src = false !== strpos( $wp_version, '-src' );
    4259 
    4260     if ( $develop_src || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) {
     4258
     4259    if ( SCRIPT_DEBUG ) {
    42614260        $settings['source'] = array(
    42624261            /** This filter is documented in wp-includes/class.wp-scripts.php */
  • trunk/src/wp-includes/general-template.php

    r32882 r32935  
    28422842function register_admin_color_schemes() {
    28432843    $suffix = is_rtl() ? '-rtl' : '';
    2844     $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     2844    $suffix .= SCRIPT_DEBUG ? '' : '.min';
    28452845
    28462846    wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
  • trunk/src/wp-settings.php

    r32116 r32935  
    3030require( ABSPATH . WPINC . '/version.php' );
    3131
    32 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
     32// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
    3333wp_initial_constants();
    3434
Note: See TracChangeset for help on using the changeset viewer.