Skip to:
Content

BuddyPress.org

Ticket #4081: 4081.01.diff

File 4081.01.diff, 1.6 KB (added by cnorris23, 7 years ago)
  • bp-core/bp-core-loader.php

     
    7777                        $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );
    7878
    7979                        // Setup the active components
    80                         $active_components     = array_flip( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_values( $bp->deactivated_components ) ) );
     80                        $active_components     = array_fill_keys( array_diff( array_values( array_merge( $optional_components, $required_components ) ), array_values( $deactivated_components ) ), '1' );
    8181
    82                         // Loop through active components and set the values
    83                         $bp->active_components = array_map( '__return_true', $active_components );
    84 
    8582                        // Set the active component global
    8683                        $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
    8784
     
    9289                        $bp->deactivated_components = array();
    9390
    9491                        // Setup the active components
    95                         $active_components     = array_flip( array_values( array_merge( $bp->optional_components, $bp->required_components ) ) );
     92                        $active_components     = array_fill_keys( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), '1' );
    9693
    97                         // Loop through active components and set the values
    98                         $bp->active_components = array_map( '__return_true', $active_components );
    99 
    10094                        // Set the active component global
    10195                        $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components );
    10296                }