Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/05/2015 06:18:13 PM (10 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-groups/bp-groups-loader.php

    r9454 r9698  
    299299
    300300        // If avatar uploads are not disabled, add avatar option
    301         if ( ! (int) $bp->site_options['bp-disable-avatar-uploads'] && $bp->avatar->show_avatars ) {
     301        $disabled_avatar_uploads = (int) bp_core_get_root_option( 'bp-disable-avatar-uploads' );
     302        if ( ! $disabled_avatar_uploads && $bp->avatar->show_avatars ) {
    302303            $this->group_creation_steps['group-avatar'] = array(
    303304                'name'     => _x( 'Photo', 'Group screen nav', 'buddypress' ),
Note: See TracChangeset for help on using the changeset viewer.