Changeset 8740
- Timestamp:
- 07/30/2014 08:40:27 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-loader.php
r8523 r8740 31 31 if ( ! file_exists( $bp_loader ) || defined( 'BP_LOAD_SOURCE' ) ) { 32 32 $bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php'; 33 $subdir = 'src'; 34 } else { 35 $subdir = 'build'; 36 } 37 38 // Set source subdirectory 39 define( 'BP_SOURCE_SUBDIRECTORY', $subdir ); 40 41 // Define overrides - only applicable to those running trunk 42 if ( ! defined( 'BP_PLUGIN_DIR' ) ) { 43 define( 'BP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 44 } 45 if ( ! defined( 'BP_PLUGIN_URL' ) ) { 46 // Be nice to symlinked directories 47 define( 'BP_PLUGIN_URL', plugins_url( trailingslashit( basename( constant( 'BP_PLUGIN_DIR' ) ) ) ) ); 33 48 } 34 49 -
trunk/src/bp-loader.php
r8626 r8740 228 228 // Path and URL 229 229 if ( ! defined( 'BP_PLUGIN_DIR' ) ) { 230 define( 'BP_PLUGIN_DIR', trailingslashit( plugin_dir_path( __FILE__ )) );230 define( 'BP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 231 231 } 232 232 233 233 if ( ! defined( 'BP_PLUGIN_URL' ) ) { 234 $plugin_url = plugin_dir_url( __FILE__ ); 235 236 // If we're using https, update the protocol. Workaround for WP13941, WP15928, WP19037. 237 if ( is_ssl() ) 238 $plugin_url = str_replace( 'http://', 'https://', $plugin_url ); 239 240 define( 'BP_PLUGIN_URL', $plugin_url ); 234 define( 'BP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 235 } 236 237 // Only applicable to those running trunk 238 if ( ! defined( 'BP_SOURCE_SUBDIRECTORY' ) ) { 239 define( 'BP_SOURCE_SUBDIRECTORY', '' ); 241 240 } 242 241 … … 261 260 262 261 // basename 263 $basename = str_replace( array( 'build/', 'src/' ), '', plugin_basename( constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php' ) );262 $basename = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php'; 264 263 265 264 // plugin is network-activated; use main site ID instead … … 359 358 360 359 // BuddyPress root directory 361 $this->file = __FILE__;362 $this->basename = str_replace( array( 'build/', 'src/' ), '', plugin_basename( $this->file ) );363 $this->plugin_dir = BP_PLUGIN_DIR;364 $this->plugin_url = BP_PLUGIN_URL;360 $this->file = constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php'; 361 $this->basename = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php'; 362 $this->plugin_dir = trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) ); 363 $this->plugin_url = trailingslashit( constant( 'BP_PLUGIN_URL' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) ); 365 364 366 365 // Languages
Note: See TracChangeset
for help on using the changeset viewer.