get_blog_option

Retrieve option value for a given blog id based on name of option.

Description

get_blog_option( (int) $blog_id, (string) $option_name, (bool) $default = false ); 

Parameters (3)

0. $blog_id (int)
Blog ID to fetch for. Not used.
1. $option_name (string)
Option name to fetch.
2. $default — Optional. (bool) => false
Whether or not default.

Usage

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

Defined (1)

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

/bp-core/bp-core-wpabstraction.php  
  1. function get_blog_option( $blog_id, $option_name, $default = false ) { 
  2. return get_option( $option_name, $default );