bp_is_network_activated()
Is BuddyPress active at the network level for this network?
Description Description
Used to determine admin menu placement, and where settings and options are stored. If you’re being really clever and manually pulling BuddyPress in with an mu-plugin or some other method, you’ll want to filter ‘bp_is_network_activated’ and override the auto-determined value.
Return Return
(bool) True if BuddyPress is network activated.
Source Source
File: bp-core/bp-core-functions.php
function bp_is_network_activated() { // Default to is_multisite(). $retval = is_multisite(); // Check the sitewide plugins array. $base = buddypress()->basename; $plugins = get_site_option( 'active_sitewide_plugins' ); // Override is_multisite() if not network activated. if ( ! is_array( $plugins ) || ! isset( $plugins[ $base ] ) ) { $retval = false; } /** * Filters whether or not we're active at the network level. * * @since 1.7.0 * * @param bool $retval Whether or not we're network activated. */ return (bool) apply_filters( 'bp_is_network_activated', $retval ); }
Changelog Changelog
Version | Description |
---|---|
1.7.0 | Introduced. |