Changeset 2982
- Timestamp:
- 05/03/2010 10:33:18 PM (14 years ago)
- Location:
- branches/1.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core.php
r2981 r2982 2006 2006 add_action( 'admin_notices', 'bp_core_activation_notice' ); 2007 2007 2008 /** 2009 * bp_core_activate_site_options() 2010 * 2011 * When switching from single to multisite we need to copy blog options to 2012 * site options. 2013 * 2014 * @package BuddyPress Core 2015 */ 2016 function bp_core_activate_site_options( $keys = array() ) { 2017 global $bp; 2018 2019 if ( !empty( $keys ) && is_array( $keys ) ) { 2020 $errors = false; 2021 2022 foreach ( $keys as $key => $default ) { 2023 if ( empty( $bp->site_options[ $key ] ) ) { 2024 $bp->site_options[ $key ] = get_blog_option( BP_ROOT_BLOG, $key, $default ); 2025 2026 if ( !update_site_option( $key, $bp->site_options[ $key ] ) ) 2027 $errors = true; 2028 } 2029 } 2030 2031 if ( empty( $errors ) ) 2032 return true; 2033 } 2034 2035 return false; 2036 } 2037 2008 2038 /******************************************************************************** 2009 2039 * Custom Actions -
branches/1.2/bp-loader.php
r2892 r2982 65 65 switch_theme( 'bp-default', 'bp-default' ); 66 66 67 /* Install site options on activation */ 68 bp_core_activate_site_options( array( 'bp-disable-account-deletion' => 0, 'bp-disable-avatar-uploads' => 0, 'bp-disable-blogforum-comments' => 0, 'bp-disable-forum-directory' => 0, 'bp-disable-profile-sync' => 0 ) ); 69 67 70 do_action( 'bp_loader_activate' ); 68 71 } -
branches/1.2/bp-xprofile.php
r2933 r2982 28 28 $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; 29 29 30 if ( empty( $bp->site_options['bp-xprofile-base-group-name'] ) ) 31 update_site_option( 'bp-xprofile-base-group-name', 'Base' ); 32 33 if ( empty( $bp->site_options['bp-xprofile-fullname-field-name'] ) ) 34 update_site_option( 'bp-xprofile-fullname-field-name', 'Name' ); 30 bp_core_activate_site_options( array( 'bp-xprofile-base-group-name' => 'Base', 'bp-xprofile-fullname-field-name' => 'Name' ) ); 35 31 36 32 $sql[] = "CREATE TABLE {$bp->profile->table_name_groups} (
Note: See TracChangeset
for help on using the changeset viewer.