bp_force_buddybar

Should the old BuddyBar be forced in place of the WP admin bar?.

Description

bp_force_buddybar( (bool) $default = true ); 

Parameters (1)

0. $default — Optional. (bool) => true
Fallback value if not found in the database. Default: true.

Usage

  1. if ( !function_exists( 'bp_force_buddybar' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-options.php'; 
  3.  
  4. // Optional. Fallback value if not found in the database. 
  5. // Default: true. 
  6. $default = true; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = bp_force_buddybar($default); 
  10.  

Defined (1)

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

/bp-core/bp-core-options.php  
  1. function bp_force_buddybar( $default = true ) { 
  2.  
  3. /** 
  4. * Filters whether or not BuddyBar should be forced in place of WP Admin Bar. 
  5. * @since 1.6.0 
  6. * @param bool $value Whether or not BuddyBar should be forced in place of WP Admin Bar. 
  7. */ 
  8. return (bool) apply_filters( 'bp_force_buddybar', (bool) bp_get_option( '_bp_force_buddybar', $default ) );