BpGroupCourses::tabLabel()

Return the tab label with proper nonce

Description

Source

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

	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.