Skip to:
Content

BuddyPress.org

Changeset 9630


Ignore:
Timestamp:
03/20/2015 01:42:23 PM (6 years ago)
Author:
djpaul
Message:

BP-Legacy: load minified CSS/JS in all builds except src.

Problem was introduced in r9092 which was an attempt to not load minified assets for the src build.
This had the unfortunate consequence of not loading the minified assets, anywhere.

Fixes #6213

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r9629 r9630  
    318318     */
    319319    private function locate_asset_in_stack( $file, $type = 'css', $script_handle = '' ) {
    320         // Child, parent, theme compat
    321320        $locations = array();
     321
     322        // Ensure the assets can be located when running from /src/.
     323        if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src' ) {
     324            $file = str_replace( '.min', '', $file );
     325        }
    322326
    323327        // No need to check child if template == stylesheet
     
    326330                'dir'  => get_stylesheet_directory(),
    327331                'uri'  => get_stylesheet_directory_uri(),
    328                 'file' => str_replace( '.min', '', $file )
     332                'file' => $file,
    329333            );
    330334        }
     
    333337            'dir'  => get_template_directory(),
    334338            'uri'  => get_template_directory_uri(),
    335             'file' => str_replace( '.min', '', $file )
     339            'file' => $file,
    336340        );
    337341
     
    339343            'dir'  => bp_get_theme_compat_dir(),
    340344            'uri'  => bp_get_theme_compat_url(),
    341             'file' => str_replace( '.min', '', $file )
     345            'file' => $file,
    342346        );
    343347
Note: See TracChangeset for help on using the changeset viewer.