I'm trying to use the example code found at http://codex.buddypress.org/developer-docs/group-extension-api/ to use in a plugin, but when I try to use it I keep getting the following error:
Fatal error: Class 'BP_Group_Extension' not found in /home/httpd/html/wearewomenmarch.net/public_html/wp-content/plugins/buddypress-group-documents/index.php on line 53
The line 53 in question is as follows:
class BP_Group_Document_List_Extension extends BP_Group_Extension {
And the whole chunk of code I'm trying to use is
class BP_Group_Document_List_Extension extends BP_Group_Extension {
var $visibility = 'private';
var $enable_create_step = false;
var $enable_nav_item = false;
var $enable_edit_item = false;
function bp_group_document_list_extension() {
$this->name = 'Documents List';
$this->slug = 'group-document-list';
$this->create_step_position = 21;
$this->nav_item_position = 31;
}
function create_screen() { }
function create_screen_save() { }
function edit_screen() { }
function edit_screen_save() { }
function display() {
display_group_document_list();
}
function widget_display() { }
}
bp_register_group_extension( 'BP_Group_Document_List_Extension' );
Groups are active on the site, and the BP Group Calendar plugin is active. I see it uses the Group Extension API as well and it works, so I'm sure I'm making some mistake. I'd appreciate any advice on where to go from here so I can resolve that fatal error.