Changeset 3994 for trunk/bp-loader.php
- Timestamp:
- 02/02/2011 04:35:06 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-loader.php
r3946 r3994 9 9 * Network: true 10 10 */ 11 11 12 /** Constants *****************************************************************/ 12 13 … … 18 19 if ( !defined( 'BP_DB_VERSION' ) ) 19 20 define( 'BP_DB_VERSION', 3605 ); 21 22 // Place your custom code (actions/filters) in a file called 23 // '/plugins/bp-custom.php' and it will be loaded before anything else. 24 if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) ) 25 require_once( WP_PLUGIN_DIR . '/bp-custom.php' ); 20 26 21 27 // Define on which blog ID BuddyPress should run … … 30 36 define( 'BP_PLUGIN_URL', plugins_url( $path = '/buddypress' ) ); 31 37 32 // Load the WP abstraction file so BuddyPress can run on all WordPress setups.33 require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' );34 35 // Place your custom code (actions/filters) in a file called36 // '/plugins/bp-custom.php' and it will be loaded before anything else.37 if ( file_exists( WP_PLUGIN_DIR . '/bp-custom.php' ) )38 require_once( WP_PLUGIN_DIR . '/bp-custom.php' );39 40 38 // Define the user and usermeta table names, useful if you are using custom or shared tables. 41 39 if ( !defined( 'CUSTOM_USER_TABLE' ) ) … … 49 47 define( 'BP_SEARCH_SLUG', 'search' ); 50 48 49 // Setup the BuddyPress theme directory 50 register_theme_directory( WP_PLUGIN_DIR . '/buddypress/bp-themes' ); 51 51 52 /** Loader ********************************************************************/ 52 53 53 require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-bootstrap.php' ); 54 // Load the WP abstraction file so BuddyPress can run on all WordPress setups. 55 require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-wpabstraction.php' ); 56 57 // Test to see whether this is a new installation or an upgraded version of BuddyPress 58 if ( !$bp->database_version = get_site_option( 'bp-db-version' ) ) 59 $bp->database_version = get_site_option( 'bp-core-db-version' ); // BP 1.2 option name 60 61 // This is a new installation. 62 if ( empty( $bp->database_version ) ) { 63 $bp->maintenence_mode = 'install'; 64 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 65 66 // An update is required 67 } elseif ( $bp->database_version < constant( 'BP_DB_VERSION' ) ) { 68 $bp->maintenence_mode = 'update'; 69 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 70 71 // Existing installation - No maintenence required 72 } else { 73 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 74 } 75 76 /** Activation ****************************************************************/ 54 77 55 78 if ( !function_exists( 'bp_loader_activate' ) ) :
Note: See TracChangeset
for help on using the changeset viewer.