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-core/bp-core-template-loader.php

    r13968 r14013  
    242242function bp_locate_template_asset( $filename ) {
    243243    // Ensure assets can be located when running from /src/.
    244     if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && 'src' === BP_SOURCE_SUBDIRECTORY ) {
     244    if ( bp_is_running_from_src_subdirectory() ) {
    245245        $filename = str_replace( '.min', '', $filename );
    246246    }
Note: See TracChangeset for help on using the changeset viewer.