bp_register_group_extension( string $group_extension_class = '' )

Register a new Group Extension.


Description Description


Parameters Parameters

$group_extension_class

(Optional) Name of the Extension class.

Default value: ''


Top ↑

Return Return

(false|null) Returns false on failure, otherwise null.


Top ↑

Source Source

File: bp-groups/classes/class-bp-group-extension.php

function bp_register_group_extension( $group_extension_class = '' ) {

	if ( ! class_exists( $group_extension_class ) ) {
		return false;
	}

	// Register the group extension on the bp_init action so we have access
	// to all plugins.
	add_action( 'bp_init', function() use ( $group_extension_class ) {
		$extension = new $group_extension_class;
		add_action( 'bp_actions', array( &$extension, '_register' ), 8 );
		add_action( 'admin_init', array( &$extension, '_register' ) );
	}, 11 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.