BBP_Forums_Group_Extension::form_permissions( bool $retval = false )
Permissions to view the ‘New Topic’/’Reply To’ form in a BuddyBoss group.
Description
Parameters
- $retval
-
(Optional) Are we allowed to view the reply form?
Default value: false
Return
(bool)
Source
File: bp-forums/groups.php
public function form_permissions( $retval = false ) { // Bail if not a group if ( ! bp_is_group() ) { return $retval; } // Bail if user is not logged in if ( ! is_user_logged_in() ) { return $retval; // Keymasters can always pass go } elseif ( bbp_is_user_keymaster() ) { $retval = true; // Non-members cannot see forms } elseif ( ! bbp_group_is_member() ) { $retval = false; // Banned users cannot see forms } elseif ( bbp_group_is_banned() ) { $retval = false; } return $retval; }
Changelog
Version | Description |
---|---|
bbPress (r4608) | 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.