Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/24/2012 06:10:17 PM (12 years ago)
Author:
johnjamesjacoby
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 #4455.
  • Props nacin.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-cssjs.php

    r6259 r6264  
    1818function xprofile_add_admin_css() {
    1919    if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
    20         if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
    21             wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . 'bp-xprofile/admin/css/admin.dev.css', array(), bp_get_version() );
    22         } else {
    23             wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . 'bp-xprofile/admin/css/admin.css',     array(), bp_get_version() );
    24         }
     20        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     21        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . "bp-xprofile/admin/css/admin{$min}.css", array(), bp_get_version() );
    2522    }
    2623}
     
    4138        wp_enqueue_script( 'jquery-ui-sortable'  );
    4239
    43         if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
    44             wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . 'bp-xprofile/admin/js/admin.dev.js', array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() );
    45         } else {
    46             wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . 'bp-xprofile/admin/js/admin.js',     array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() );
    47         }
     40        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     41        wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . "bp-xprofile/admin/js/admin{$min}.js", array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() );
    4842    }
    4943}
Note: See TracChangeset for help on using the changeset viewer.