Ticket #3560: 3560.001.diff
File 3560.001.diff, 1.7 KB (added by , 13 years ago) |
---|
-
bp-core/bp-core-buddybar.php
526 526 /** 527 527 * Handle the Admin Bar/BuddyBar business 528 528 * 529 * @global num $wp_version 530 * @todo Clean up global constants 529 * @since 1.2.0 530 * 531 * @global string $wp_version 532 * @uses bp_get_option() 533 * @uses is_user_logged_in() 534 * @uses bp_use_wp_admin_bar() 535 * @uses show_admin_bar() 536 * @uses add_action() To hook 'bp_adminbar_logo' to 'bp_adminbar_logo' 537 * @uses add_action() To hook 'bp_adminbar_login_menu' to 'bp_adminbar_menus' 538 * @uses add_action() To hook 'bp_adminbar_account_menu' to 'bp_adminbar_menus' 539 * @uses add_action() To hook 'bp_adminbar_thisblog_menu' to 'bp_adminbar_menus' 540 * @uses add_action() To hook 'bp_adminbar_random_menu' to 'bp_adminbar_menus' 541 * @uses add_action() To hook 'bp_core_admin_bar' to 'wp_footer' 542 * @uses add_action() To hook 'bp_core_admin_bar' to 'admin_footer' 531 543 */ 532 544 function bp_core_load_admin_bar() { 533 545 global $wp_version; 534 546 547 // Don't show if admin bar is disabled for non-logged in users 548 if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) 549 return; 550 535 551 // Show the WordPress admin bar 536 552 if ( bp_use_wp_admin_bar() && $wp_version >= 3.1 ) { 537 553 show_admin_bar( true ); … … 542 558 // Keep the WP admin bar from loading 543 559 show_admin_bar( false ); 544 560 545 if ( (int)bp_get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )546 return;547 548 561 // Actions used to build the BP admin bar 549 562 add_action( 'bp_adminbar_logo', 'bp_adminbar_logo' ); 550 563 add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );