Skip to:
Content

BuddyPress.org

Changeset 8199


Ignore:
Timestamp:
03/29/2014 12:24:56 AM (10 years ago)
Author:
boonebgorges
Message:

Don't check buddypress()->site_options in bp_get_option()

This reverts the change in r8188. The check in site_options is intended to
provide a speed benefit, but it causes problems when not mirrored properly
in bp_update_option(). We'll take a closer look at this in a future release.

See #4913

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-options.php

    r8188 r8199  
    227227 */
    228228function bp_get_option( $option_name, $default = '' ) {
    229     // check buddypress()->site_options array first
    230     if ( isset( buddypress()->site_options[$option_name] ) ) {
    231         $value = buddypress()->site_options[$option_name];
    232 
    233     // query for the option if not available
    234     } else {
    235         $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default );
    236     }
    237 
     229    $value = get_blog_option( bp_get_root_blog_id(), $option_name, $default );
    238230    return apply_filters( 'bp_get_option', $value );
    239231}
Note: See TracChangeset for help on using the changeset viewer.