add_blog_option

Add a new option for a given blog id.

Description

add_blog_option( (int) $blog_id, (string) $option_name, (mixed) $option_value ); 

Parameters (3)

0. $blog_id (int)
Blog ID to add for. Not used.
1. $option_name (string)
Option name to add.
2. $option_value (mixed)
Option value to add.

Usage

  1. if ( !function_exists( 'add_blog_option' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-wpabstraction.php'; 
  3.  
  4. // Blog ID to add for. Not used. 
  5. $blog_id = -1; 
  6.  
  7. // Option name to add. 
  8. $option_name = ''; 
  9.  
  10. // Option value to add. 
  11. $option_value = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = add_blog_option($blog_id, $option_name, $option_value); 
  15.  

Defined (1)

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

/bp-core/bp-core-wpabstraction.php  
  1. function add_blog_option( $blog_id, $option_name, $option_value ) { 
  2. return add_option( $option_name, $option_value );