bp_core_do_network_admin

Should BuddyPress appear in network admin (vs a single site Dashboard)?.

Description

bp_core_do_network_admin(); 

Because BuddyPress can be installed in multiple ways and with multiple configurations, we need to check a few things to be confident about where to hook into certain areas of WordPress's admin.


Usage

  1. if ( !function_exists( 'bp_core_do_network_admin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_do_network_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-functions.php  
  1. function bp_core_do_network_admin() { 
  2.  
  3. // Default. 
  4. $retval = bp_is_network_activated(); 
  5.  
  6. if ( bp_is_multiblog_mode() ) { 
  7. $retval = false; 
  8.  
  9. /** 
  10. * Filters whether or not BuddyPress should appear in network admin. 
  11. * @since 1.5.0 
  12. * @param bool $retval Whether or not BuddyPress should be in the network admin. 
  13. */ 
  14. return (bool) apply_filters( 'bp_core_do_network_admin', $retval );