BpGroupCourses::tabLabel()

Return the tab label with proper nonce

Description

Source

File: bp-integrations/learndash/buddypress/components/BpGroupCourses.php

145
146
147
148
149
150
151
152
153
154
155
156
protected function tabLabel()
{
    $default = __('Courses', 'buddyboss');
 
    if (! $currentGroup = groups_get_current_group()) {
        return $default;
    }
 
    $coursesCount = count(bp_learndash_get_group_courses($currentGroup->id));
 
    return _nx('Course', 'Courses', $coursesCount, 'bp group tab name', 'buddyboss');
}

Changelog

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.