Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/24/2012 06:10:17 PM (9 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-core/bp-core-admin.php

    r6159 r6264  
    404404    public function enqueue_scripts() {
    405405
    406         $maybe_dev = '';
    407         if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
    408             $maybe_dev = '.dev';
    409 
    410         $file = $this->css_url . "common{$maybe_dev}.css";
     406        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     407
     408        $file = $this->css_url . "common{$min}.css";
    411409        $file = apply_filters( 'bp_core_admin_common_css', $file );
    412410        wp_enqueue_style( 'bp-admin-common-css', $file, array(), bp_get_version() );
     
    416414
    417415            // Styling
    418             $file = $this->css_url . "wizard{$maybe_dev}.css";
     416            $file = $this->css_url . "wizard{$min}.css";
    419417            $file = apply_filters( 'bp_core_admin_wizard_css', $file );
    420418            wp_enqueue_style( 'bp-admin-wizard-css', $file, array(), bp_get_version() );
    421419
    422420            // JS
    423             $file = $this->js_url . "wizard{$maybe_dev}.js";
     421            $file = $this->js_url . "wizard{$min}.js";
    424422            $file = apply_filters( 'bp_core_admin_wizard_js', $file );
    425423            wp_enqueue_script( 'bp-admin-wizard-js', $file, array(), bp_get_version() );
Note: See TracChangeset for help on using the changeset viewer.