Skip to:
Content

BuddyPress.org

Changeset 9012


Ignore:
Timestamp:
09/14/2014 10:50:01 AM (10 years ago)
Author:
djpaul
Message:

Core: only return forums from bp_core_get_packaged_component_ids() if using bbPress 1.

This otherwise causes the bbPress 2's subnav bar to not be rendered in templates due to the behaviour of members/single/plugins.php.

We would normally consider using bp_is_active for this kind of check, but because both bbPress 1 and (possibly, in the future) 2 could return true, we need a more reliable check for bbPress 1 only; see the ticket for full details.

See #5552. Fixes #5873, props r-a-y.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r8831 r9012  
    346346 */
    347347function bp_core_get_packaged_component_ids() {
    348     return array(
     348    $components = array(
    349349        'activity',
    350350        'members',
     
    356356        'settings',
    357357        'notifications',
    358         'forums',
    359358    );
     359
     360    // only add legacy forums if it is enabled
     361    // prevents conflicts with bbPress, which also uses the same 'forums' id
     362    if ( class_exists( 'BP_Forums_Component' ) ) {
     363        $components[] = 'forums';
     364    }
     365
     366    return $components;
    360367}
    361368
Note: See TracChangeset for help on using the changeset viewer.