Changeset 14013
- Timestamp:
- 08/31/2024 01:26:36 AM (6 weeks ago)
- Location:
- trunk/src
- Files:
-
- 4 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 } -
trunk/src/bp-core/bp-core-rest-api.php
r13968 r14013 34 34 */ 35 35 function bp_rest_in_buddypress() { 36 $is_src = defined( 'BP_SOURCE_SUBDIRECTORY' ) && BP_SOURCE_SUBDIRECTORY === 'src'; 37 38 return ! $is_src && ! bp_rest_is_plugin_active(); 36 return ! bp_is_running_from_src_subdirectory() && ! bp_rest_is_plugin_active(); 39 37 } 40 38 -
trunk/src/bp-core/bp-core-template-loader.php
r13968 r14013 242 242 function bp_locate_template_asset( $filename ) { 243 243 // 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() ) { 245 245 $filename = str_replace( '.min', '', $filename ); 246 246 } -
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r13882 r14013 407 407 408 408 // 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() ) { 410 410 $file = str_replace( '.min', '', $file ); 411 411 }
Note: See TracChangeset
for help on using the changeset viewer.