Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How do I selectively register a group extension?


Anonymous User 96400
Inactive

@anonymized-96400

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' );

Skip to toolbar