bp_delete_options

Delete default options.

Description

bp_delete_options(); 

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

Currently unused.


Usage

  1. if ( !function_exists( 'bp_delete_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_delete_options(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-options.php  
  1. function bp_delete_options() { 
  2.  
  3. // Get the default options and values. 
  4. $options = bp_get_default_options(); 
  5.  
  6. // Add default options. 
  7. foreach ( array_keys( $options ) as $key ) { 
  8. delete_option( $key ); 
  9.  
  10. /** 
  11. * Fires after the deletion of default options when BuddyPress is first deactivated. 
  12. * Allows previously activated plugins to append their own options. 
  13. * @since 1.6.0 
  14. */