bp_use_wp_admin_bar()
Should we use the WP Toolbar?
Description Description
The WP Toolbar, introduced in WP 3.1, is fully supported in BuddyPress as of BP 1.5. For BP 1.6, the WP Toolbar is the default.
Return Return
(bool) Default: true. False when WP Toolbar support is disabled.
Source Source
File: bp-core/bp-core-functions.php
function bp_use_wp_admin_bar() { // Default to true (to avoid loading deprecated BuddyBar code). $use_admin_bar = true; // Has the WP Toolbar constant been explicitly opted into? if ( defined( 'BP_USE_WP_ADMIN_BAR' ) ) { $use_admin_bar = (bool) BP_USE_WP_ADMIN_BAR; // ...or is the old BuddyBar being forced back into use? } elseif ( bp_force_buddybar( false ) ) { $use_admin_bar = false; } /** * Filters whether or not to use the admin bar. * * @since 1.5.0 * * @param bool $use_admin_bar Whether or not to use the admin bar. */ return (bool) apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar ); }
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |