| | 370 | // Trim off namespace and filename |
| | 371 | $trimmed = array(); |
| | 372 | foreach ( (array) $old_deactivated_components as $component => $value ) |
| | 373 | $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) ); |
| | 374 | |
| | 375 | $active_components = array_flip( array_diff( array_values( array( 'members', 'groups', 'activity', 'forums', 'blogs', 'register', 'activate' ) ), array_values( $trimmed ) ) ); |
| | 376 | |
| | 377 | // Loop through active components and set the values |
| | 378 | foreach( $new_active_components as $component => $value ) |
| | 379 | $active_components[$component] = 1; |
| | 380 | |
| | 381 | } else { |
| | 382 | // Get active components |
| | 383 | $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) ); |
| | 384 | } |
| | 385 | |