Function Reference/get site option
Description
Retrieve option value based on name of option.
In multisite, return network option, blog option otherwise.
Usage
<?php get_site_option( $option, $default , $use_cache ) ?>
Parameters
- $option
- (string) (required) Name of option to retrieve. Expected to not be SQL-escaped .
- Default: None
- $default
- (mixed) (optional) Optional value to return if option doesn't exist.
- Default: false
- $use_cache
- (boolean) (optional) Whether to use cache. Multisite only.
- Default: true
Return Values
- (mixed)
- Value set for the option.
Examples
Notes
Change Log
since 2.8.0
Source File
get_site_option() is located in wp-includes/functions.php.
Related