Core::registerGroupComponent()
Register BP group extension components based on settings
Description
Source
File: bp-integrations/learndash/buddypress/Core.php
protected function registerGroupComponent() { if (! bp_is_group() && ! bp_is_group_create()) { return; } if (bp_ld_sync('settings')->get('learndash.enabled')) { require_once bp_ld_sync()->path('/buddypress/components/BpGroupCourses.php'); $extension = new BpGroupCourses; add_action('bp_actions', [$extension, '_register'], 8); add_action('admin_init', [$extension, '_register']); } if (bp_ld_sync('settings')->get('reports.enabled')) { require_once bp_ld_sync()->path('/buddypress/components/BpGroupReports.php'); $extension = new BpGroupReports; add_action('bp_actions', [$extension, '_register'], 8); add_action('admin_init', [$extension, '_register']); } }
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.