bp_core_load_admin_bar

Handle the Toolbar/BuddyBar business.

Description

bp_core_load_admin_bar(); 

Usage

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

Defined (1)

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

/bp-core/bp-core-adminbar.php  
  1. function bp_core_load_admin_bar() { 
  2.  
  3. // Show the Toolbar for logged out users. 
  4. if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) { 
  5. show_admin_bar( true ); 
  6.  
  7. // Hide the WordPress Toolbar and show the BuddyBar. 
  8. if ( ! bp_use_wp_admin_bar() ) { 
  9. _doing_it_wrong( __FUNCTION__, __( 'The BuddyBar is no longer supported. Please migrate to the WordPress toolbar as soon as possible.', buddypress ), '2.1.0' ); 
  10.  
  11. // Load deprecated code if not available. 
  12. if ( ! function_exists( 'bp_core_admin_bar' ) ) { 
  13. requirebuddypress)->plugin_dir . 'bp-core/deprecated/2.1.php'; 
  14.  
  15. // Keep the WP Toolbar from loading. 
  16. show_admin_bar( false ); 
  17.  
  18. // Actions used to build the BP Toolbar. 
  19.  
  20. // Actions used to append BP Toolbar to footer.