bbp_pre_get_option( bool $value = '' )

Filter default options and allow them to be overloaded from inside the $bbp->options array.

Description

Parameters

$value

(bool) (Optional) Default value false

Default value: ''

Return

(mixed) false if not overloaded, mixed if set

Source

File: bp-forums/core/options.php

function bbp_pre_get_option( $value = '' ) {

	// Remove the filter prefix
	$option = str_replace( 'pre_option_', '', current_filter() );

	// Check the options global for preset value
	if ( isset( bbpress()->options[$option] ) )
		$value = bbpress()->options[$option];

	// Always return a value, even if false
	return $value;
}

Changelog

Changelog
Version Description
bbPress (r3451) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.