BP_Integration::is_activated()

Description

Source

File: bp-core/classes/class-bp-integration.php

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
public function is_activated() {
    if ( ! $this->required_plugin ) {
        return false;
    }
 
    $plugins = get_option( 'active_plugins' ) ?: [];
    if ( in_array( $this->required_plugin, $plugins ) ) {
        return true;
    }
 
    if ( ! is_multisite() ) {
        return false;
    }
 
    $plugins = get_site_option( 'active_sitewide_plugins' ) ?: [];
    return isset( $plugins[$this->required_plugin] );
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.