Skip to:
Content

BuddyPress.org

Changeset 4585


Ignore:
Timestamp:
07/03/2011 11:24:58 PM (13 years ago)
Author:
boonebgorges
Message:

Ensure that wp_sitemeta WP options are picked up when BP is loaded. Fixes #3313

File:
1 edited

Legend:

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

    r4559 r4585  
    10421042        }
    10431043    }
     1044   
     1045    // Some WP settings are always in sitemeta
     1046    if ( is_multisite() ) {
     1047        $sitewide_option_keys = apply_filters( 'bp_core_sitewide_site_options', array(
     1048            'tags_blog_id',
     1049            'registration',
     1050            'fileupload_maxk'
     1051        ) );
     1052       
     1053        $sitewide_options_keys_cs = "'" . implode( "','", (array)$sitewide_option_keys ) ."'";
     1054       
     1055        $network_meta = $wpdb->get_results( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ({$sitewide_options_keys_cs}) AND site_id = {$wpdb->siteid}" );
     1056    }
    10441057
    10451058    $root_blog_meta_keys  = "'" . implode( "','", (array)$root_blog_options ) ."'";
     
    10481061    $site_options         = array();
    10491062
    1050     foreach( array( $site_meta, $root_blog_meta ) as $meta ) {
     1063    foreach( array( $site_meta, $root_blog_meta, $network_meta ) as $meta ) {
    10511064        if ( !empty( $meta ) ) {
    10521065            foreach( (array)$meta as $meta_item ) {
Note: See TracChangeset for help on using the changeset viewer.