bp_register_group_extension( string $group_extension_class = '' )
Register a new Group Extension.
Description
Parameters
- $group_extension_class
-
(Optional) Name of the Extension class.
Default value: ''
Return
(false|null) Returns false on failure, otherwise null.
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 ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.