Warning: This function has been deprecated.

bp_core_activate_site_options( array $keys = array() )

Copy BP options from a single site to multisite config.


Description Description

Run when switching from single to multisite and we need to copy blog options to site options.

This function is no longer used.


Parameters Parameters

$keys

(Optional) Array of site options.

Default value: array()


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: bp-core/bp-core-options.php

function bp_core_activate_site_options( $keys = array() ) {

	if ( !empty( $keys ) && is_array( $keys ) ) {
		$bp = buddypress();

		$errors = false;

		foreach ( $keys as $key => $default ) {
			if ( empty( $bp->site_options[ $key ] ) ) {
				$bp->site_options[ $key ] = bp_get_option( $key, $default );

				if ( !bp_update_option( $key, $bp->site_options[ $key ] ) ) {
					$errors = true;
				}
			}
		}

		if ( empty( $errors ) ) {
			return true;
		}
	}

	return false;
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 This function has been deprecated.
1.2.4 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.