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

Note that this controls only the display of the navigation item. Access to the tab is controlled by the user_can_visit() check.

Parameters

$user_can_see_nav_item

(bool) (Optional) Whether or not the user can see the nav item.

Default value: false

Return

(bool)

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
BuddyPress 2.1.0 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.