bbp_filter_get_user_option( bool $value = false,  $option = '',  $user )

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


Description Description


Parameters Parameters

$value

(Optional) Default value false

Default value: false


Top ↑

Return Return

(mixed) false if not overloaded, mixed if set


Top ↑

Source Source

File: includes/users/options.php

function bbp_filter_get_user_option( $value = false, $option = '', $user = 0 ) {
	$bbp = bbpress();

	// Check the options global for preset value
	if ( isset( $user->ID ) && isset( $bbp->user_options[ $user->ID ] ) && ! empty( $bbp->user_options[ $user->ID ][ $option ] ) ) {
		$value = $bbp->user_options[ $user->ID ][ $option ];
	}

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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