BP_Members_Admin::bp_registration_update_site_option( string $old_value, string $value )

Update the BuddyBoss > Settings > General > Registrations options based on the Multi Site registration settings.

Description

Parameters

$old_value

(Required)

$value

(Required)

Source

File: bp-members/classes/class-bp-members-admin.php

	public function bp_registration_update_site_option( $old_value, $value ) {

		if ( is_multisite() ) {
			$check_current_wp = $value;
			$check_current_bp = (bool) bp_enable_site_registration();
			if ( ( 'all' === $check_current_wp || 'user' === $check_current_wp ) && false === $check_current_bp ) {
				bp_update_option( 'bp-enable-site-registration', 1 );
			} elseif ( ( 'none' === $check_current_wp || 'registration' === $check_current_wp ) && true === $check_current_bp ) {
				bp_update_option( 'bp-enable-site-registration', 1 );
			}
		}

	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.9 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.