Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/23/2011 04:46:40 PM (15 years ago)
Author:
boonebgorges
Message:

Enables the Components/Pages setup panel to work correctly when BP_ROOT_BLOG is set to something other than 1. Fixes #2456

File:
1 edited

Legend:

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

    r4183 r4257  
    343343 */
    344344function bp_core_admin_page_options() {
     345    global $bp;
     346   
     347    if ( !bp_is_root_blog() ) {
     348        $bp->is_switched = 1;
     349        switch_to_blog( BP_ROOT_BLOG );
     350    }
     351       
    345352    // Get the existing WP pages
    346353    $existing_pages = bp_core_get_page_meta();
     
    430437
    431438    <?php
     439   
     440    if ( isset( $bp->is_switched ) ) {
     441        restore_current_blog();
     442        unset( $bp->is_switched );
     443    }
    432444}
    433445
Note: See TracChangeset for help on using the changeset viewer.