Changeset 3736 for trunk/bp-loader.php
- Timestamp:
- 01/18/2011 10:46:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-loader.php
r3728 r3736 11 11 12 12 define( 'BP_VERSION', '1.3-bleeding' ); 13 define( 'BP_DB_VERSION', 1225 );13 define( 'BP_DB_VERSION', 3705 ); 14 14 15 15 // Define on which blog ID BuddyPress should run … … 17 17 define( 'BP_ROOT_BLOG', 1 ); 18 18 19 /*** 20 * Check if this is the first time BuddyPress has been loaded, or the first time 21 * since an update. If so, load the install/update routine only. 22 */ 23 if ( get_site_option( 'bp-db-version' ) < constant( 'BP_DB_VERSION' ) ) { 19 // Register BuddyPress themes contained within the bp-themes folder 20 register_theme_directory( WP_PLUGIN_DIR . '/buddypress/bp-themes' ); 21 22 // Test to see whether this is a new installation or an upgraded version of BuddyPress 23 $bp_db_version = get_site_option( 'bp-db-version' ); 24 if ( ! $bp_db_version ) 25 $bp_db_version = get_site_option( 'bp-core-db-version' ); // BP 1.2 option name 26 27 if ( ! $bp_db_version ) { 28 // This is a new installation. Run the wizard before loading BP core files 29 define( 'BP_IS_INSTALL', true ); 24 30 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 25 26 /***27 * If the install or update routine is completed and everything is up to date28 * continue loading BuddyPress as normal.29 */30 31 } else { 31 32 /*** … … 65 66 if ( !isset( $bp_deactivated['bp-xprofile.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') ) 66 67 include( BP_PLUGIN_DIR . '/bp-xprofile.php' ); 68 69 // If this is an upgrade, load the upgrade file 70 if ( $bp_db_version < constant( 'BP_DB_VERSION' ) ) { 71 define( 'BP_IS_UPGRADE', true ); 72 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 73 } 67 74 68 75 add_action( 'plugins_loaded', 'bp_loaded', 20 ); … … 136 143 } 137 144 138 // Activation Function 145 /** 146 * Defines BP's activation routine. 147 * 148 * Most of BP's crucial setup is handled by the setup wizard. This function takes care of some 149 * issues with incompatible legacy themes, and provides a hook for other functions to know that 150 * BP has been activated. 151 * 152 * @package BuddyPress Core 153 */ 139 154 function bp_loader_activate() { 140 155 // Force refresh theme roots. 141 156 delete_site_transient( 'theme_roots' ); 157 158 if ( !function_exists( 'get_blog_option' ) ) 159 require ( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-wpabstraction.php' ); 142 160 143 161 // Switch the user to the new bp-default if they are using the old
Note: See TracChangeset
for help on using the changeset viewer.