Changeset 2982 for branches/1.2/bp-core.php
- Timestamp:
- 05/03/2010 10:33:18 PM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-core.php (modified) (1 diff)
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
Note: See TracChangeset
for help on using the changeset viewer.