Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/12/2020 12:16:11 AM (4 years ago)
Author:
imath
Message:

Check required components the right way into bp_is_active() function

As the buddypress()->required_components is not an associative array, we need to check values instead of keys.

Props exoconsult

Fixes #8193

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template.php

    r12332 r12517  
    20742074
    20752075    // Is component in either the active or required components arrays.
    2076     if ( isset( buddypress()->active_components[ $component ] ) || isset( buddypress()->required_components[ $component ] ) ) {
     2076    if ( isset( buddypress()->active_components[ $component ] ) || in_array( $component, buddypress()->required_components, true ) ) {
    20772077        $retval = true;
    20782078
Note: See TracChangeset for help on using the changeset viewer.