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

    r9665 r9698  
    22452245
    22462246        if ( is_multisite() ) {
    2247             if ( ! isset( $bp->site_options ) ) {
    2248                 $bp->site_options = bp_core_get_root_options();
    2249             }
    2250 
    2251             if ( in_array( $bp->site_options['registration'], array( 'all', 'user' ) ) ) {
     2247            $registration = bp_core_get_root_option( 'registration' );
     2248
     2249            if ( in_array( $registration, array( 'all', 'user' ) ) ) {
    22522250                $signup_allowed = true;
    22532251            }
Note: See TracChangeset for help on using the changeset viewer.