bbp_add_options

Add default options.

Description

bbp_add_options(); 

Hooked to bbp_activate, it is only called once when bbPress is activated. This is non-destructive, so existing settings will not be overridden.


Usage

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

Defined (1)

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

/includes/core/options.php  
  1. function bbp_add_options() { 
  2.  
  3. // Add default options 
  4. foreach ( bbp_get_default_options() as $key => $value ) 
  5. add_option( $key, $value ); 
  6.  
  7. // Allow previously activated plugins to append their own options. 
  8. do_action( 'bbp_add_options' );