Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/18/2016 11:10:33 AM (8 years ago)
Author:
djpaul
Message:

Fix script/style enqueue path when using BP dev. repo. with release build of WP, and SCRIPT_DEBUG=false.

If you have a WordPress release build (that is, not the dev SVN with its src folder) with a BuddyPress dev build (with its src folder), and set SCRIPT_DEBUG=false, BuddyPress will try to load the minified versions of its CSS and JS assets. As these minified assets only exist in our release builds, this causes 404 errors in this particular set of circumstances.

Fixes #6920

File:
1 edited

Legend:

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

    r10557 r10613  
    1818function xprofile_add_admin_css() {
    1919    if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
    20         $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     20        $min = bp_core_get_minified_asset_suffix();
    2121
    2222        wp_enqueue_style( 'xprofile-admin-css', buddypress()->plugin_url . "bp-xprofile/admin/css/admin{$min}.css", array(), bp_get_version() );
     
    4444        wp_enqueue_script( 'jquery-ui-sortable'  );
    4545
    46         $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     46        $min = bp_core_get_minified_asset_suffix();
    4747        wp_enqueue_script( 'xprofile-admin-js', buddypress()->plugin_url . "bp-xprofile/admin/js/admin{$min}.js", array( 'jquery', 'jquery-ui-sortable' ), bp_get_version() );
    4848
Note: See TracChangeset for help on using the changeset viewer.