BpGroupCourses::showTabOnView()
Determine who can see the tab
Description
Source
File: bp-integrations/learndash/buddypress/components/BpGroupCourses.php
protected function showTabOnView()
{
if (! $currentGroup = groups_get_current_group()) {
return 'noone';
}
$generator = bp_ld_sync('buddypress')->sync->generator($currentGroup->id);
if (! $generator->hasLdGroup()) {
return 'noone';
}
if (! learndash_group_enrolled_courses($generator->getLdGroupId())) {
return 'noone';
}
return bp_ld_sync('settings')->get('buddypress.tab_access', true);
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.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.