Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/31/2024 01:26:36 AM (3 months ago)
Author:
imath
Message:

Introduce a function to inform about whether BP was loaded from src

bp_is_running_from_src_subdirectory() informs whether BuddyPress was loaded from the src subdirectory (trunk version). This function exposes the 'bp_is_running_from_src_subdirectory' to let developers tests code that is only available when BuddyPress is built.

Props emaralive, espellcaste.

See #9210
Fixes #9224
Closes https://github.com/buddypress/buddypress/pull/358

File:
1 edited

Legend:

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

    r13882 r14013  
    407407
    408408        // Ensure the assets can be located when running from /src/.
    409         if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src' ) {
     409        if ( bp_is_running_from_src_subdirectory() ) {
    410410            $file = str_replace( '.min', '', $file );
    411411        }
Note: See TracChangeset for help on using the changeset viewer.