Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Group API in BP 1.2 – double slashes in component url


D Cartwright
Participant

@aekeron

Hi Paul,

The full code is in this (small) plugin here:

https://wordpress.org/extend/plugins/buddypress-group-activity-stream-subscription/

The url is created with the following code:

class Group_Activity_Subscription extends BP_Group_Extension {

function group_activity_subscription() {
global $bp;

$this->name = 'Notifications';
$this->slug = 'notifications';

// Only enable the notifications nav item if the user is a member of the group
if ( groups_is_user_member( $bp->loggedin_user->id , $bp->groups->current_group->id ) ) {
$this->enable_nav_item = true;
} else {
$this->enable_nav_item = false;
}

$this->nav_item_position = 91;

$this->enable_create_step = false;
$this->enable_edit_item = false;

add_action ( 'wp_print_styles' , array( &$this , 'add_settings_stylesheet' ) );

}

Skip to toolbar