• Resolved David Cavins

    (@dcavins)


    Hi David-

    I’m programmatically adding BP groups using the wrapper function groups_hierarchy_create_group() and found a one-letter typo.

    function groups_hierarchy_create_group( $args = '' ) {
    	if( $group_id = groups_create_group( $args ) ) {
    		if( isset( $args['parent_id'] ) ) {
    			$group = new BP_Group_Hierarchy( $group_id );
    			$group->parent_id = (int)$args['parent_id'];
    			$group->save();
    		}
    		return $group_id;
    	}
    	return false;
    }

    $group = new BP_Group_Hierarchy( $group_id ); should read
    $group = new BP_Groups_Hierarchy( $group_id );.

    Thanks for the excellent plugin!

    -David

    https://www.ads-software.com/plugins/bp-group-hierarchy/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Dean

    (@ddean)

    Hi dcavins –

    Thanks for catching this! A fix has been posted to the development version and will be included in the next release.

    – David

    Plugin Author David Dean

    (@ddean)

    This is fixed in version 1.4.1.

    Please let me know if you run into anything else!

    – David

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tiny typo in groups_hierarchy_create_group()’ is closed to new replies.