[buddypress-trac] [BuddyPress Trac] #5987: BP_FORUMS_SLUG doesn't work for groups forums

buddypress-trac noreply at wordpress.org
Tue Nov 4 10:44:51 UTC 2014


#5987: BP_FORUMS_SLUG doesn't work for groups forums
--------------------------+-----------------------------
 Reporter:  slaFFik       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Forums        |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5987>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list