Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,692
- How-to & Troubleshooting
- 128,228
- Creating & Extending
- 25,679
- Requests & Feedback
- 9,405
- Third Party Plugins
- 9,753
- Showcase
- 3,321
- Ideas
- 1,349
- Miscellaneous
- 8,879
-
Ok, it seems I’ve got it working now. I ended up copying and modifying bp_register_group_extension:
function activate_skool_courses()
{
global $bp;
$type = groups_get_groupmeta( $bp->groups->current_group->id, 'group_type' );
if( $type == 'organization' )
{
$extension = new Group_Skool_Courses;
add_action( "wp", array( &$extension, "_register" ), 2 );
}
}
add_action( 'plugins_loaded', 'activate_skool_courses' );
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS