BP_Group_Extension::user_can_see_nav_item( bool $user_can_see_nav_item = false )
Determine whether the current user should see this nav tab.
Description Description
Note that this controls only the display of the navigation item. Access to the tab is controlled by the user_can_visit() check.
Parameters Parameters
- $user_can_see_nav_item
-
(Optional) Whether or not the user can see the nav item.
Default value: false
Return Return
(bool)
Source Source
File: bp-groups/classes/class-bp-group-extension.php
public function user_can_see_nav_item( $user_can_see_nav_item = false ) { // Always allow moderators to see nav items, even if explicitly 'noone' if ( ( 'noone' !== $this->params['show_tab'] ) && bp_current_user_can( 'bp_moderate' ) ) { return true; } return $this->user_can_see_nav_item; }
Changelog Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |