Ticket #3153: 3153.003.diff
File 3153.003.diff, 2.3 KB (added by , 13 years ago) |
---|
-
bp-core/bp-core-loader.php
67 67 // Pre 1.3 Backwards compatibility 68 68 } elseif ( $deactivated_components = get_site_option( 'bp-deactivated-components' ) ) { 69 69 // Trim off namespace and filename 70 foreach ( $deactivated_components as $component => $value )70 foreach ( (array) $deactivated_components as $component => $value ) 71 71 $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) ); 72 72 73 73 // Set globals 74 74 $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed ); 75 75 76 76 // Setup the active components 77 $active_components 77 $active_components = array_flip( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ) ); 78 78 79 79 // Loop through active components and set the values 80 foreach( $active_components as $component => $value ) 81 $bp->active_components[$component] = 1; 80 $bp->active_components = array_map( '__return_true', $active_components ); 82 81 83 82 // Set the active component global 84 $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 83 $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 84 85 // Default to all components active 86 } else { 87 // Set globals 88 $bp->deactivated_components = array(); 89 90 // Setup the active components 91 $active_components = array_flip( array_values( array_merge( $bp->optional_components, $bp->required_components ) ) ); 92 93 // Loop through active components and set the values 94 $bp->active_components = array_map( '__return_true', $active_components ); 95 96 // Set the active component global 97 $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 85 98 } 86 99 87 100 // Loop through optional components … … 195 208 'parent_slug' => $bp->core->profile->slug, 196 209 'screen_function' => 'bp_core_catch_profile_uri' 197 210 ); 211 198 212 } 199 213 } 200 214 }