bp_delete_option

Delete an option.

Description

bp_delete_option( (string) $option_name ); 

This is a wrapper for , which in turn deletes settings data (such as bp-pages) on the appropriate blog, given your current setup.

Parameters (1)

0. $option_name (string)
The option key to be deleted.

Usage

  1. if ( !function_exists( 'bp_delete_option' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // The option key to be deleted. 
  5. $option_name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_delete_option($option_name); 
  9.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_delete_option( $option_name ) { 
  2. return delete_blog_option( bp_get_root_blog_id(), $option_name );