Changeset 1262 for trunk/bp-core.php
- Timestamp:
- 03/26/2009 11:20:12 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-core.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1250 r1262 14 14 define( 'BP_CORE_DB_VERSION', '1030' ); 15 15 16 /* Place your custom code (actions/filters) in a file called bp-custom.php and it will be loaded before anything else. */ 17 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) ) 18 require( WPMU_PLUGIN_DIR . '/bp-custom.php' ); 19 16 20 /* Load the language file */ 17 21 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' ) ) 18 22 load_textdomain( 'buddypress', WPMU_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' ); 19 23 20 /* Place your custom code (actions/filters) in a file called bp-custom.php and it will be loaded before anything else. */ 21 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) ) 22 require( WPMU_PLUGIN_DIR . '/bp-custom.php' ); 23 24 /* Load the files containing functions that we globally will need. */ 24 25 require ( 'bp-core/bp-core-catchuri.php' ); 25 26 require ( 'bp-core/bp-core-classes.php' ); … … 32 33 require ( 'bp-core/bp-core-ajax.php' ); 33 34 require ( 'bp-core/bp-core-notifications.php' ); 34 require ( 'bp-core/bp-core-admin.php' );35 require ( 'bp-core/bp-core-signup.php' );36 require ( 'bp-core/bp-core-activation.php' );37 35 38 36 /* Define the slug for member pages and the members directory (e.g. domain.com/[members] ) */ … … 92 90 $bp->displayed_user->domain = bp_core_get_user_domain($displayed_user_id); 93 91 94 /* The component being used eg: http:// andy.domain.com/ [profile] */92 /* The component being used eg: http://domain.com/members/andy/ [profile] */ 95 93 $bp->current_component = $current_component; // type: string 96 94 97 /* The current action for the component eg: http:// andy.domain.com/profile/ [edit] */95 /* The current action for the component eg: http://domain.com/members/andy/profile/ [edit] */ 98 96 $bp->current_action = $current_action; // type: string 99 97 100 /* The action variables for the current action eg: http:// andy.domain.com/profile/edit/ [group] / [6] */98 /* The action variables for the current action eg: http://domain.com/members/andy/profile/edit/ [group] / [6] */ 101 99 $bp->action_variables = $action_variables; // type: array 102 100 103 /* Only used where a component has a sub item, e.g. groups: http:// andy.domain.com/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/101 /* Only used where a component has a sub item, e.g. groups: http://domain.com/members/andy/groups/ [my-group] / home - manipulated in the actual component not in catch uri code.*/ 104 102 $bp->current_item = ''; // type: string 105 103 … … 107 105 $bp->is_single_item = false; 108 106 109 /* The default component to use if none are set and someone visits: http:// andy.domain.com/*/107 /* The default component to use if none are set and someone visits: http://domain.com/members/andy */ 110 108 $bp->default_component = 'profile'; 111 109 … … 224 222 global $wpdb, $bp; 225 223 226 if ( is_site_admin() ) { 227 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 228 if ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION ) 229 bp_core_install(); 230 } 224 if ( !is_site_admin() ) 225 return false; 226 227 require ( 'bp-core/bp-core-admin.php' ); 228 229 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 230 if ( get_site_option('bp-core-db-version') < BP_CORE_DB_VERSION ) 231 bp_core_install(); 231 232 } 232 233 add_action( 'admin_menu', 'bp_core_check_installed' ); … … 246 247 global $wpdb, $bp; 247 248 248 if ( is_site_admin() ) { 249 /* Add the administration tab under the "Site Admin" tab for site administrators */ 250 add_submenu_page( 'wpmu-admin.php', __("BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 1, "bp_core_admin_settings", "bp_core_admin_settings" ); 251 } 249 if ( !is_site_admin() ) 250 return false; 251 252 /* Add the administration tab under the "Site Admin" tab for site administrators */ 253 add_submenu_page( 'wpmu-admin.php', __("BuddyPress", 'buddypress'), __("BuddyPress", 'buddypress'), 1, "bp_core_admin_settings", "bp_core_admin_settings" ); 254 252 255 } 253 256 add_action( 'admin_menu', 'bp_core_add_admin_menu' );
Note:
See TracChangeset
for help on using the changeset viewer.