Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/05/2015 06:18:13 PM (5 years ago)
Author:
boonebgorges
Message:

Introduce bp_core_get_root_option() and use throughout BP.

Previously, we referenced the $bp->site_options array directly. This causes
problems in cases where these options may be referenced before the array is
initially populated. bp_core_get_root_option() will fetch the requested
value from the array if it's been populated, and will populate it if it has not.

Fixes #6045.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-forums/bp-forums-loader.php

    r9351 r9698  
    5858
    5959        // The location of the bbPress stand-alone config file
    60         if ( isset( $bp->site_options['bb-config-location'] ) )
    61             $this->bbconfig = $bp->site_options['bb-config-location'];
     60        $bbconfig = bp_core_get_root_option( 'bb-config-location' );
     61        if ( '' !== $bbconfig )
     62            $this->bbconfig = $bbconfig;
    6263
    6364        // All globals for messaging component.
Note: See TracChangeset for help on using the changeset viewer.