Opened 11 years ago
Closed 11 years ago
#5987 closed defect (bug)
BP_FORUMS_SLUG doesn't work for groups forums
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Forums | Keywords: | |
| Cc: |
Description
When I define BP_FORUMS_SLUG I change the way the slug of /members/slaffik/forums looks like.
Though this doesn't work for Groups -> Forums.
Reason is this:
// Forums are enabled and turned on
if ( $this->current_group->enable_forum && bp_is_active( 'forums' ) ) {
$sub_nav[] = array(
'name' => _x( 'Forum', 'My Group screen nav', 'buddypress' ),
'slug' => 'forum',
'parent_url' => $group_link,
'parent_slug' => $this->current_group->slug,
'screen_function' => 'groups_screen_group_forum',
'position' => 40,
'user_has_access' => $this->current_group->user_has_access,
'item_css_id' => 'forums'
);
}
As you can see, 'forum' is hardcoded. Can you use this logic:
isset( $bp->pages->forums->slug ) ? $bp->pages->forums->slug : BP_FORUMS_SLUG,
as in bp-forums/bp-forums-loader.php around line 67 (in BuddyPress 2.1.1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Wouldn't it supposed to be the other way around?! Or am I missing something here?!
Use BP_FORUMS_SLUG if available and then a fallback if it's not. In this case, the default behavior.