Skip to:
Content

bbPress.org

Changeset 4602


Ignore:
Timestamp:
12/20/2012 11:39:25 AM (8 years ago)
Author:
johnjamesjacoby
Message:

BuddyPress Groups:

  • In maybe_unset_forum_menu(), also check for current groupmeta.
  • Props r-a-y.
  • Fixes #2094.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/extend/buddypress/group.php

    r4556 r4602  
    157157
    158158        // Are forums enabled for this group?
    159         $checked = (bool) ( bp_get_new_group_enable_forum() );
     159        $checked = bp_get_new_group_enable_forum() || groups_get_groupmeta( bp_get_new_group_id(), 'forum_id' );
    160160
    161161        // Tweak the nav item variable based on if group has forum or not
    162         $this->enable_nav_item = $checked;
     162        $this->enable_nav_item = (bool) $checked;
    163163    }
    164164
     
    376376        $forum_id     = 0;
    377377        $forum_ids    = bbp_get_group_forum_ids( bp_get_new_group_id() );
     378
    378379        if ( !empty( $forum_ids ) )
    379380            $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
Note: See TracChangeset for help on using the changeset viewer.