Re: How do I selectively register a group extension?
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' );