Index: bp-blogs/bp-blogs-template.php
===================================================================
--- bp-blogs/bp-blogs-template.php (revision 4556)
+++ bp-blogs/bp-blogs-template.php (working copy)
@@ -362,10 +362,7 @@ function bp_total_blog_count_for_user( $user_id = 0 ) {
function bp_blog_signup_enabled() {
global $bp;
- $active_signup = $bp->site_options['registration'];
-
- if ( !$active_signup )
- $active_signup = 'all';
+ $active_signup = isset( $bp->site_options['registration'] ) ? $bp->site_options['registration'] : 'all';
$active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user"
Index: bp-core/admin/bp-core-admin.php
===================================================================
--- bp-core/admin/bp-core-admin.php (revision 4556)
+++ bp-core/admin/bp-core-admin.php (working copy)
@@ -58,7 +58,7 @@ function bp_core_admin_settings() {
// Settings form submitted, now save the settings.
foreach ( (array)$_POST['bp-admin'] as $key => $value )
- update_site_option( $key, $value );
+ bp_update_option( $key, $value );
} ?>
@@ -86,8 +86,8 @@ function bp_core_admin_settings() {
: |
- checked="checked" id="bp-disable-profile-sync" value="1" />
- checked="checked" id="bp-disable-profile-sync" value="0" />
+ checked="checked" id="bp-disable-profile-sync" value="1" />
+ checked="checked" id="bp-disable-profile-sync" value="0" />
|
@@ -96,24 +96,24 @@ function bp_core_admin_settings() {
: |
- checked="checked" id="bp-admin-hide-loggedout-adminbar-yes" value="1" />
- checked="checked" id="bp-admin-hide-loggedout-adminbar-no" value="0" />
+ checked="checked" id="bp-admin-hide-loggedout-adminbar-yes" value="1" />
+ checked="checked" id="bp-admin-hide-loggedout-adminbar-no" value="0" />
|
: |
- checked="checked" id="bp-admin-disable-avatar-uploads-yes" value="1" />
- checked="checked" id="bp-admin-disable-avatar-uploads-no" value="0" />
+ checked="checked" id="bp-admin-disable-avatar-uploads-yes" value="1" />
+ checked="checked" id="bp-admin-disable-avatar-uploads-no" value="0" />
|
: |
- checked="checked" id="bp-disable-account-deletion" value="1" />
- checked="checked" id="bp-disable-account-deletion" value="0" />
+ checked="checked" id="bp-disable-account-deletion" value="1" />
+ checked="checked" id="bp-disable-account-deletion" value="0" />
|
@@ -122,8 +122,8 @@ function bp_core_admin_settings() {
: |
- checked="checked" id="bp-disable-forum-directory" value="1" />
- checked="checked" id="bp-disable-forum-directory" value="0" />
+ checked="checked" id="bp-disable-forum-directory" value="1" />
+ checked="checked" id="bp-disable-forum-directory" value="0" />
|
@@ -134,8 +134,8 @@ function bp_core_admin_settings() {
: |
- checked="checked" id="bp-disable-blogforum-comments" value="1" />
- checked="checked" id="bp-disable-blogforum-comments" value="0" />
+ checked="checked" id="bp-disable-blogforum-comments" value="1" />
+ checked="checked" id="bp-disable-blogforum-comments" value="0" />
|
@@ -146,8 +146,8 @@ function bp_core_admin_settings() {
: |
- id="bp-restrict-group-creation" value="1" />
- id="bp-restrict-group-creation" value="0" />
+ id="bp-restrict-group-creation" value="1" />
+ id="bp-restrict-group-creation" value="0" />
|
@@ -183,7 +183,7 @@ function bp_core_admin_component_setup_handler() {
// Settings form submitted, now save the settings. First, set active components
if ( isset( $_POST['bp_components'] ) ) {
$bp->active_components = stripslashes_deep( $_POST['bp_components'] );
- update_site_option( 'bp-active-components', $bp->active_components );
+ bp_update_option( 'bp-active-components', $bp->active_components );
}
// Then, update the directory pages
@@ -262,8 +262,10 @@ function bp_core_admin_component_setup() {
*/
function bp_core_admin_component_options() {
global $bp_wizard;
+
+ require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
- $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) );
+ $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
// An array of strings looped over to create component setup markup
$optional_components = array(
Index: bp-core/admin/bp-core-schema.php
===================================================================
--- bp-core/admin/bp-core-schema.php (revision 4556)
+++ bp-core/admin/bp-core-schema.php (working copy)
@@ -204,8 +204,8 @@ function bp_core_install_extended_profiles() {
$charset_collate = bp_core_set_charset();
$bp_prefix = bp_core_get_table_prefix();
- update_site_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) );
- update_site_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) );
+ bp_update_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) );
+ bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) );
$sql[] = "CREATE TABLE {$bp_prefix}bp_xprofile_groups (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
@@ -262,10 +262,10 @@ function bp_core_install_extended_profiles() {
$insert_sql = array();
if ( !$wpdb->get_var( "SELECT id FROM {$bp_prefix}bp_xprofile_groups WHERE id = 1" ) )
- $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_groups ( name, description, can_delete ) VALUES ( " . $wpdb->prepare( '%s', stripslashes( get_site_option( 'bp-xprofile-base-group-name' ) ) ) . ", '', 0 );";
+ $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_groups ( name, description, can_delete ) VALUES ( " . $wpdb->prepare( '%s', stripslashes( bp_get_option( 'bp-xprofile-base-group-name' ) ) ) . ", '', 0 );";
if ( !$wpdb->get_var( "SELECT id FROM {$bp_prefix}bp_xprofile_fields WHERE id = 1" ) )
- $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_fields ( group_id, parent_id, type, name, description, is_required, can_delete ) VALUES ( 1, 0, 'textbox', " . $wpdb->prepare( '%s', stripslashes( get_site_option( 'bp-xprofile-fullname-field-name' ) ) ) . ", '', 1, 0 );";
+ $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_fields ( group_id, parent_id, type, name, description, is_required, can_delete ) VALUES ( 1, 0, 'textbox', " . $wpdb->prepare( '%s', stripslashes( bp_get_option( 'bp-xprofile-fullname-field-name' ) ) ) . ", '', 1, 0 );";
dbDelta( $insert_sql );
}
Index: bp-core/admin/bp-core-update.php
===================================================================
--- bp-core/admin/bp-core-update.php (revision 4556)
+++ bp-core/admin/bp-core-update.php (working copy)
@@ -17,7 +17,7 @@ class BP_Core_Setup_Wizard {
global $bp;
// Ensure that we have access to some utility functions
- include( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
+ require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
// Get current DB version
$this->database_version = !empty( $bp->database_version ) ? (int) $bp->database_version : 0;
@@ -259,11 +259,11 @@ class BP_Core_Setup_Wizard {
members->slug ) ? $bp->members->slug : __( 'members', 'buddypress' );
@@ -738,7 +748,7 @@ class BP_Core_Setup_Wizard {
// Update the active components option early if we're updating
if ( 'update' == $this->setup_type )
- update_site_option( 'bp-active-components', $bp->active_components );
+ bp_update_option( 'bp-active-components', $bp->active_components );
return true;
}
@@ -771,16 +781,12 @@ class BP_Core_Setup_Wizard {
switch_to_blog( BP_ROOT_BLOG );
// Move bp-pages data from the blog options table to site options
- $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
- $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' );
- $existing_pages = $existing_pages_data[$page_blog_id];
-
- $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] );
- $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages );
+ $existing_pages = bp_get_option( 'bp-pages' );
- $existing_pages_data[$page_blog_id] = $bp_pages;
+ $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] );
+ $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages );
- update_site_option( 'bp-pages', $existing_pages_data );
+ bp_update_option( 'bp-pages', $existing_pages );
if ( !empty( $wpdb->blogid ) && ( $wpdb->blogid != BP_ROOT_BLOG ) && ( !defined( 'BP_ENABLE_MULTIBLOG' ) ) )
restore_current_blog();
@@ -788,7 +794,7 @@ class BP_Core_Setup_Wizard {
bp_core_install( $active_components );
}
- update_site_option( 'bp-active-components', $active_components );
+ bp_update_option( 'bp-active-components', $active_components );
return true;
}
@@ -807,7 +813,7 @@ class BP_Core_Setup_Wizard {
foreach ( (array)$_POST['bp_components'] as $key => $value )
$active_components[$key] = 1;
- update_site_option( 'bp-active-components', $active_components );
+ bp_update_option( 'bp-active-components', $active_components );
wp_cache_flush();
bp_core_install();
@@ -835,10 +841,7 @@ class BP_Core_Setup_Wizard {
wp_delete_post( $page_id, true );
$blog_pages = $this->setup_pages( (array)$_POST['bp_pages'] );
- $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
- $bp_pages = array( $page_blog_id => $blog_pages );
-
- update_site_option( 'bp-pages', $bp_pages );
+ bp_update_option( 'bp-pages', $blog_pages );
if ( !empty( $wpdb->blogid ) && ( $wpdb->blogid != BP_ROOT_BLOG ) && ( !defined( 'BP_ENABLE_MULTIBLOG' ) ) )
restore_current_blog();
@@ -1007,6 +1010,7 @@ class BP_Core_Setup_Wizard {
check_admin_referer( 'bpwizard_finish' );
// Update the DB version in the database
+ // Stored in sitemeta. Do not use bp_update_option()
update_site_option( 'bp-db-version', $this->new_version );
delete_site_option( 'bp-core-db-version' );
@@ -1075,7 +1079,7 @@ function bp_core_install( $active_components = false ) {
global $wpdb;
if ( empty( $active_components ) )
- $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) );
+ $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
@@ -1131,7 +1135,7 @@ function bp_update_db_stuff() {
// On first installation - record all existing blogs in the system.
if ( !(int)$bp->site_options['bp-blogs-first-install'] && is_multisite() ) {
bp_blogs_record_existing_blogs();
- add_site_option( 'bp-blogs-first-install', 1 );
+ bp_update_option( 'bp-blogs-first-install', 1 );
}
if ( is_multisite() )
@@ -1248,23 +1252,20 @@ function bp_core_update_add_admin_menu_styles() {
add_action( 'admin_head', 'bp_core_update_add_admin_menu_styles' );
/**
- * Fetches BP pages from the meta table, depending on setup
+ * Fetches BP pages from the meta table
*
* @package BuddyPress Core
* @since 1.3
*
* @return array $page_ids
*/
-function bp_core_update_get_page_meta() {
- $page_ids = get_site_option( 'bp-pages' );
-
- $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false;
-
- $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG;
-
- $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false;
+function bp_core_update_get_page_meta() {
+ require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
+
+ if ( !$page_ids = bp_get_option( 'bp-pages' ) )
+ $page_ids = array();
- return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids );
+ return apply_filters( 'bp_core_update_get_page_meta', $page_ids );
}
function bp_core_update_do_network_admin() {
Index: bp-core/bp-core-buddybar.php
===================================================================
--- bp-core/bp-core-buddybar.php (revision 4556)
+++ bp-core/bp-core-buddybar.php (working copy)
@@ -321,7 +321,7 @@ function bp_core_admin_bar() {
if ( defined( 'BP_DISABLE_ADMIN_BAR' ) && BP_DISABLE_ADMIN_BAR )
return false;
- if ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
+ if ( (int)bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
return false;
$bp->doing_admin_bar = true;
@@ -486,7 +486,7 @@ function bp_core_load_admin_bar() {
// Keep the WP admin bar from loading
show_admin_bar( false );
- if ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
+ if ( (int)bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
return;
// Admin bar styles
Index: bp-core/bp-core-functions.php
===================================================================
--- bp-core/bp-core-functions.php (revision 4556)
+++ bp-core/bp-core-functions.php (working copy)
@@ -1,6 +1,103 @@
$old_page_ids
- );
-
- update_site_option( 'bp-pages', $new_page_ids );
- }
-
- $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false;
-
- return apply_filters( 'bp_core_get_page_meta', $blog_page_ids );
+ }
+
+ return apply_filters( 'bp_core_get_page_meta', $page_ids );
}
/**
@@ -71,15 +149,7 @@ function bp_core_get_page_meta() {
* @param array $blog_page_ids The IDs of the WP pages corresponding to BP component directories
*/
function bp_core_update_page_meta( $blog_page_ids ) {
- if ( !$page_ids = get_site_option( 'bp-pages' ) )
- $page_ids = array();
-
- // Generally, we key by the BP_ROOT_BLOG. Exception: when BP_ENABLE_MULTIBLOG is turned on
- $key = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
-
- $page_ids[$key] = $blog_page_ids;
-
- update_site_option( 'bp-pages', $page_ids );
+ bp_update_option( 'bp-pages', $blog_page_ids );
}
/**
@@ -874,6 +944,7 @@ add_action( 'bp_init', 'bp_core_add_ajax_hook' );
* site options.
*
* @package BuddyPress Core
+ * @todo Does this need to be here anymore after the introduction of bp_get_option etc?
*/
function bp_core_activate_site_options( $keys = array() ) {
global $bp;
@@ -883,9 +954,9 @@ function bp_core_activate_site_options( $keys = array() ) {
foreach ( $keys as $key => $default ) {
if ( empty( $bp->site_options[ $key ] ) ) {
- $bp->site_options[ $key ] = get_blog_option( BP_ROOT_BLOG, $key, $default );
+ $bp->site_options[ $key ] = bp_get_option( $key, $default );
- if ( !update_site_option( $key, $bp->site_options[ $key ] ) )
+ if ( !bp_update_option( $key, $bp->site_options[ $key ] ) )
$errors = true;
}
}
@@ -907,7 +978,7 @@ function bp_core_activate_site_options( $keys = array() ) {
function bp_core_get_site_options() {
global $bp, $wpdb;
- // These options come from the options table in WP single, and sitemeta in MS
+ // These options come from the options table
$site_options = apply_filters( 'bp_core_site_options', array(
'bp-deactivated-components',
'bp-blogs-first-install',
@@ -935,10 +1006,41 @@ function bp_core_get_site_options() {
$meta_keys = "'" . implode( "','", (array)$site_options ) ."'";
- if ( is_multisite() )
- $site_meta = $wpdb->get_results( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ({$meta_keys}) AND site_id = {$wpdb->siteid}" );
- else
- $site_meta = $wpdb->get_results( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ({$meta_keys})" );
+ $site_meta = $wpdb->get_results( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ({$meta_keys})" );
+
+ // Backward compatibility - moves sitemeta to the blog
+ if ( empty( $site_meta ) || ( count( $site_meta ) < count( $site_options ) ) ) {
+ if ( is_multisite() ) {
+ $ms_site_meta = $wpdb->get_results( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ({$meta_keys}) AND site_id = {$wpdb->siteid}" );
+ } else {
+ $ms_site_meta = $wpdb->get_results( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ({$meta_keys})" );
+ }
+
+ $settings_to_move = array(
+ 'bp-deactivated-components',
+ 'bp-blogs-first-install',
+ 'bp-disable-blog-forum-comments',
+ 'bp-xprofile-base-group-name',
+ 'bp-xprofile-fullname-field-name',
+ 'bp-disable-profile-sync',
+ 'bp-disable-avatar-uploads',
+ 'bp-disable-account-deletion',
+ 'bp-disable-forum-directory',
+ 'bp-disable-blogforum-comments',
+ 'bb-config-location',
+ 'hide-loggedout-adminbar',
+ );
+
+ foreach( (array)$ms_site_meta as $meta ) {
+ if ( isset( $meta->name ) && in_array( $meta->name, $settings_to_move ) ) {
+ bp_update_option( $meta->name, $meta->value );
+
+ if ( empty( $site_meta[$meta->name] ) ) {
+ $site_meta[$meta->name] = $meta->value;
+ }
+ }
+ }
+ }
$root_blog_meta_keys = "'" . implode( "','", (array)$root_blog_options ) ."'";
$root_blog_meta_table = $wpdb->get_blog_prefix( BP_ROOT_BLOG ) . 'options';
@@ -948,7 +1050,8 @@ function bp_core_get_site_options() {
foreach( array( $site_meta, $root_blog_meta ) as $meta ) {
if ( !empty( $meta ) ) {
foreach( (array)$meta as $meta_item ) {
- $site_options[$meta_item->name] = $meta_item->value;
+ if ( isset( $meta_item->name ) )
+ $site_options[$meta_item->name] = $meta_item->value;
}
}
}
Index: bp-core/bp-core-loader.php
===================================================================
--- bp-core/bp-core-loader.php (revision 4556)
+++ bp-core/bp-core-loader.php (working copy)
@@ -21,6 +21,11 @@ require_once( BP_PLUGIN_DIR . '/bp-core/deprecated/1.3.php' );
if ( !defined( 'BP_DISABLE_ADMIN_BAR' ) )
require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php' );
+// Move active components from sitemeta, if necessary
+// Provides backpat with earlier versions of BP
+if ( is_multisite() && $active_components = get_site_option( 'bp-active-components' ) )
+ bp_update_option( 'bp-active-components', $active_components );
+
/** "And now for something completely different" ******************************/
class BP_Core extends BP_Component {
@@ -66,12 +71,12 @@ class BP_Core extends BP_Component {
$bp->required_components = apply_filters( 'bp_required_components', array( 'members' ) );
// Get a list of activated components
- if ( $active_components = get_site_option( 'bp-active-components' ) ) {
+ if ( $active_components = bp_get_option( 'bp-active-components' ) ) {
$bp->active_components = apply_filters( 'bp_active_components', $active_components );
$bp->deactivated_components = apply_filters( 'bp_deactivated_components', array_values( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_keys( $bp->active_components ) ) ) );
// Pre 1.3 Backwards compatibility
- } elseif ( $deactivated_components = get_site_option( 'bp-deactivated-components' ) ) {
+ } elseif ( $deactivated_components = bp_get_option( 'bp-deactivated-components' ) ) {
// Trim off namespace and filename
foreach ( (array) $deactivated_components as $component => $value )
$trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
Index: bp-core/bp-core-template.php
===================================================================
--- bp-core/bp-core-template.php (revision 4556)
+++ bp-core/bp-core-template.php (working copy)
@@ -441,17 +441,6 @@ function bp_registration_needs_activation() {
return apply_filters( 'bp_registration_needs_activation', true );
}
-function bp_get_option( $option_name ) {
- global $bp;
-
- if ( !empty( $bp->site_options[$option_name] ) )
- $retval = $bp->site_options[$option_name];
- else
- $retval = false;
-
- return apply_filters( 'bp_get_option', $retval );
-}
-
/**
* Allow templates to pass parameters directly into the template loops via AJAX
*
Index: bp-core/bp-core-wpabstraction.php
===================================================================
--- bp-core/bp-core-wpabstraction.php (revision 4556)
+++ bp-core/bp-core-wpabstraction.php (working copy)
@@ -16,13 +16,19 @@ if ( !is_multisite() ) {
global $wpdb;
$wpdb->base_prefix = $wpdb->prefix;
- $wpdb->blogid = 1;
+ $wpdb->blogid = BP_ROOT_BLOG;
if ( !function_exists( 'get_blog_option' ) ) {
function get_blog_option( $blog_id, $option_name, $default = false ) {
return get_option( $option_name, $default );
}
}
+
+ if ( !function_exists( 'update_blog_option' ) ) {
+ function update_blog_option( $blog_id, $option_name, $value ) {
+ return update_option( $option_name, $value );
+ }
+ }
if ( !function_exists( 'switch_to_blog' ) ) {
function switch_to_blog() {
Index: bp-forums/bp-forums-admin.php
===================================================================
--- bp-forums/bp-forums-admin.php (revision 4556)
+++ bp-forums/bp-forums-admin.php (working copy)
@@ -143,7 +143,7 @@ function bp_forums_configure_existing_install() {
$_REQUEST['bbconfigloc'] .= 'bb-config.php';
}
- update_site_option( 'bb-config-location', $_REQUEST['bbconfigloc'] );
+ bp_update_option( 'bb-config-location', $_REQUEST['bbconfigloc'] );
if ( !file_exists( $_REQUEST['bbconfigloc'] ) )
return false;
@@ -214,7 +214,7 @@ function bp_forums_bbpress_install() {
$initial_write = $file;
}
- update_site_option( 'bb-config-location', ABSPATH . 'bb-config.php' );
+ bp_update_option( 'bb-config-location', ABSPATH . 'bb-config.php' );
return $initial_write;
}
Index: bp-groups/bp-groups-template.php
===================================================================
--- bp-groups/bp-groups-template.php (revision 4556)
+++ bp-groups/bp-groups-template.php (working copy)
@@ -1928,7 +1928,7 @@ function bp_group_member_admin_pagination() {
* @since BuddyPress 1.3
*
* @uses apply_filters() To call 'bp_user_can_create_groups'.
- * @uses get_site_option() To retrieve value of 'bp_restrict_group_creation'. Defaults to 0.
+ * @uses bp_get_option() To retrieve value of 'bp_restrict_group_creation'. Defaults to 0.
* @uses is_super_admin() To determine if current user if super admin.
*
* @return bool True if user can create groups. False otherwise.
@@ -1939,7 +1939,7 @@ function bp_user_can_create_groups() {
return true;
// Get group creation option, default to 0 (allowed)
- $restricted = (int) get_site_option( 'bp_restrict_group_creation', 0 );
+ $restricted = (int) bp_get_option( 'bp_restrict_group_creation', 0 );
// Allow by default
$can_create = true;
Index: bp-members/bp-members-functions.php
===================================================================
--- bp-members/bp-members-functions.php (revision 4556)
+++ bp-members/bp-members-functions.php (working copy)
@@ -527,7 +527,6 @@ function bp_core_get_all_posts_for_user( $user_id = 0 ) {
* @uses is_super_admin() Checks to see if the user is a site administrator.
* @uses wpmu_delete_user() Deletes a user from the system on multisite installs.
* @uses wp_delete_user() Deletes a user from the system on singlesite installs.
- * @uses get_site_option Checks if account deletion is allowed
*/
function bp_core_delete_account( $user_id = 0 ) {
global $bp, $wp_version;
Index: bp-xprofile/bp-xprofile-admin.php
===================================================================
--- bp-xprofile/bp-xprofile-admin.php (revision 4556)
+++ bp-xprofile/bp-xprofile-admin.php (working copy)
@@ -49,7 +49,7 @@ function xprofile_admin( $message = '', $type = 'error' ) {
-
+