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-core/bp-core-template.php

    r9618 r9698  
    820820        }
    821821
    822         $status = buddypress()->site_options['registration'];
     822        $status = bp_core_get_root_option( 'registration' );
    823823        if ( ( 'none' !== $status ) && ( 'user' !== $status ) ) {
    824824            return true;
Note: See TracChangeset for help on using the changeset viewer.