Changeset 14013 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 08/31/2024 01:26:36 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r13998 r14013 138 138 function bp_is_running_wp( $version, $compare = '>=' ) { 139 139 return version_compare( $GLOBALS['wp_version'], $version, $compare ); 140 } 141 142 /** 143 * Informs whether BuddyPress was loaded from the `src` subdirectory (trunk version). 144 * 145 * @since 15.0.0 146 * 147 * @return boolean True if BuddyPress was loaded from the `src` subdirectory, false otherwise. 148 */ 149 function bp_is_running_from_src_subdirectory() { 150 $is_src = defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src'; 151 152 /** 153 * Filter here to edit the way BuddyPress was loaded. 154 * 155 * @since 15.0.0 156 * 157 * @param boolean $is_src True if BuddyPress was loaded from the `src` subdirectory, false otherwise. 158 */ 159 return apply_filters( 'bp_is_running_from_src_subdirectory', $is_src ); 140 160 } 141 161 … … 2767 2787 2768 2788 // Ensure the assets can be located when running from /src/. 2769 if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src') {2789 if ( bp_is_running_from_src_subdirectory() ) { 2770 2790 $ext = str_replace( '.min', '', $ext ); 2771 2791 } … … 4981 5001 * version of BuddyPress do not load deprecated functions. 4982 5002 */ 4983 if ( defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src') {5003 if ( bp_is_running_from_src_subdirectory() ) { 4984 5004 return array(); 4985 5005 }
Note: See TracChangeset
for help on using the changeset viewer.