Changeset 6965
- Timestamp:
- 04/30/2013 01:21:41 AM (12 years ago)
- Location:
- branches/1.7/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7/bp-core/bp-core-actions.php
r6822 r6965 67 67 add_action( 'bp_init', 'bp_setup_nav', 6 ); 68 68 add_action( 'bp_init', 'bp_setup_title', 8 ); 69 add_action( 'bp_init', 'bp_core_load_admin_bar', 10 );70 69 add_action( 'bp_init', 'bp_core_load_admin_bar_css', 12 ); 71 70 -
branches/1.7/bp-core/bp-core-adminbar.php
r6762 r6965 63 63 */ 64 64 function bp_core_load_admin_bar() { 65 global $wp_version; 65 // Show the Toolbar for logged out users 66 if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) { 67 show_admin_bar( true ); 68 } 66 69 67 // Don't show if Toolbar is disabled for non-logged in users 68 if ( (int) bp_get_option( 'hide-loggedout-adminbar' ) && ! is_user_logged_in() ) 69 return; 70 71 // Show the WordPress Toolbar 72 if ( bp_use_wp_admin_bar() && $wp_version >= 3.1 ) { 73 74 // Respect user's Toolbar display preferences 75 if ( is_user_logged_in() && ( bp_get_admin_bar_pref( 'front', bp_loggedin_user_id() ) || bp_get_admin_bar_pref( 'admin', bp_loggedin_user_id() ) ) ) 76 return; 77 78 show_admin_bar( true ); 79 80 // Hide the WordPress Toolbar 81 } elseif ( !bp_use_wp_admin_bar() ) { 70 // Hide the WordPress Toolbar and show the BuddyBar 71 if ( ! bp_use_wp_admin_bar() ) { 82 72 83 73 // Keep the WP Toolbar from loading … … 96 86 } 97 87 } 88 add_action( 'init', 'bp_core_load_admin_bar', 9 ); 98 89 99 90 /**
Note: See TracChangeset
for help on using the changeset viewer.