Changeset 8579
- Timestamp:
- 07/09/2014 08:35:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r8571 r8579 316 316 * @uses apply_filters() Filter 'bp_use_wp_admin_bar' to alter. 317 317 * 318 * @return bool False when WP Toolbar support is disabled, true when enabled. 319 * Default: true. 318 * @return bool Default: true. False when WP Toolbar support is disabled. 320 319 */ 321 320 function bp_use_wp_admin_bar() { 321 322 // Default to true (to avoid loading deprecated BuddyBar code) 322 323 $use_admin_bar = true; 323 324 324 // Has the WP Toolbar constant been explicity set? 325 if ( defined( 'BP_USE_WP_ADMIN_BAR' ) && ! BP_USE_WP_ADMIN_BAR ) 325 // Has the WP Toolbar constant been explicity opted into? 326 if ( defined( 'BP_USE_WP_ADMIN_BAR' ) ) { 327 $use_admin_bar = (bool) BP_USE_WP_ADMIN_BAR; 328 329 // ...or is the old BuddyBar being forced back into use? 330 } elseif ( bp_force_buddybar( false ) ) { 326 331 $use_admin_bar = false; 327 328 // Has the admin chosen to use the BuddyBar during an upgrade? 329 elseif ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) 330 $use_admin_bar = false; 331 332 return apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar ); 332 } 333 334 return (bool) apply_filters( 'bp_use_wp_admin_bar', $use_admin_bar ); 333 335 } 334 336
Note: See TracChangeset
for help on using the changeset viewer.