WordPress.org

Make WordPress Core

Changeset 21592


Ignore:
Timestamp:
08/23/12 00:04:18 (5 years ago)
Author:
nacin
Message:

Switch to .min for compressed JS and CSS files.

  • This moves our "development" versions from .dev.js to .js (same for css).
  • The compressed version then moves from .js to .min.js (same for css).

By switching to the standard .min convention, it sets expectations for developers,
and works nicely with existing tools such as ack.

fixes #21633.

Location:
trunk
Files:
3 edited
79 copied
79 moved

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r21484 r21592  
    20212021 */ 
    20222022function register_admin_color_schemes() { 
    2023     wp_admin_css_color( 'classic', _x( 'Blue', 'admin color scheme' ), admin_url( 'css/colors-classic.css' ), 
     2023    wp_admin_css_color( 'classic', _x( 'Blue', 'admin color scheme' ), admin_url( 'css/colors-classic.min.css' ), 
    20242024        array( '#5589aa', '#cfdfe9', '#d1e5ee', '#eff8ff' ) ); 
    2025     wp_admin_css_color( 'fresh', _x( 'Gray', 'admin color scheme' ), admin_url( 'css/colors-fresh.css' ), 
     2025    wp_admin_css_color( 'fresh', _x( 'Gray', 'admin color scheme' ), admin_url( 'css/colors-fresh.min.css' ), 
    20262026        array( '#555', '#a0a0a0', '#ccc', '#f1f1f1' ) ); 
    20272027} 
  • trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html

    r21545 r21592  
    66 
    77<link rel="stylesheet" href="css/editimage.css?ver=356-20120818" type="text/css" media="all" /> 
    8 <script type="text/javascript" src="js/editimage.js?ver=356-20120818"></script> 
     8<script type="text/javascript" src="js/editimage.min.js?ver=356-20120818"></script> 
    99<script type="text/javascript" src="../../utils/form_utils.js?ver=356-20120818"></script> 
    1010<base target="_self" /> 
  • trunk/wp-includes/script-loader.php

    r21591 r21592  
    5858    $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/'); 
    5959 
    60     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; 
     60    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; 
    6161 
    6262    $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js" ); 
     
    461461    $styles->default_dirs = array('/wp-admin/', '/wp-includes/css/'); 
    462462 
    463     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; 
    464  
    465     $rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'wplink', 'customize-controls' ); 
    466     // Any rtl stylesheets that don't have a .dev version for ltr 
     463    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; 
     464 
     465    $rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls' ); 
     466    // Any rtl stylesheets that don't have a .min version 
    467467    $no_suffix = array( 'farbtastic' ); 
    468468 
     
    507507 */ 
    508508function wp_prototype_before_jquery( $js_array ) { 
     509    if ( false === $prototype = array_search( 'prototype', $js_array, true ) ) 
     510        return $js_array; 
     511 
    509512    if ( false === $jquery = array_search( 'jquery', $js_array, true ) ) 
    510         return $js_array; 
    511  
    512     if ( false === $prototype = array_search( 'prototype', $js_array, true ) ) 
    513513        return $js_array; 
    514514 
     
    576576 
    577577        if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) 
    578             $url = preg_replace('/.css$|.css(?=\?)/', '.dev.css', $url); 
     578            $url = preg_replace( '/.min.css$|.min.css(?=\?)/', '.css', $url ); 
    579579 
    580580        if ( isset($parsed['query']) && $parsed['query'] ) { 
Note: See TracChangeset for help on using the changeset viewer.