bp_delete_options()

Delete default options.

Description

Hooked to bp_uninstall, it is only called once when BuddyPress is uninstalled. This is destructive, so existing settings will be destroyed.

Currently unused.

Source

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

function bp_delete_options() {

	// Get the default options and values.
	$options = bp_get_default_options();

	// Add default options.
	foreach ( array_keys( $options ) as $key ) {
		delete_option( $key );
	}

	/**
	 * Fires after the deletion of default options when BuddyPress is first deactivated.
	 *
	 * Allows previously activated plugins to append their own options.
	 *
	 * @since BuddyPress 1.6.0
	 */
	do_action( 'bp_delete_options' );
}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 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.