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
Parameters
- $value
-
(Optional) Default value false
Default value: false
Return
(mixed) false if not overloaded, mixed if set
Source
File: bp-forums/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; }
Changelog
Version | Description |
---|---|
bbPress (r3910) | 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.