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.


Top ↑

Parameters Parameters

$option_name

(string) (Required) The option to be retrieved.

$default

(string) (Optional) Default value to be returned if the option isn't set. See get_blog_option().

Default value: ''


Top ↑

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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.