bp_get_option( string $option_name, string $default = '' )
Retrieve an option.
Description Description
This is a wrapper for get_blog_option(), which in turn stores settings data (such as bp-pages) on the appropriate blog, given your current setup.
The ‘bp_get_option’ filter is primarily for backward-compatibility.
Parameters Parameters
- $option_name
-
(Required) The option to be retrieved.
- $default
-
(Optional) Default value to be returned if the option isn't set. See get_blog_option().
Default value: ''
Return Return
(mixed) The value for the option.
Source Source
File: bp-core/bp-core-options.php
function bp_get_option( $option_name, $default = '' ) { $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default ); /** * Filters the option value for the requested option. * * @since 1.5.0 * * @param mixed $value The value for the option. */ return apply_filters( 'bp_get_option', $value ); }
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |