Changeset 12893 for trunk/src/bp-core/bp-core-adminbar.php
- Timestamp:
- 04/19/2021 04:25:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-adminbar.php
r12495 r12893 45 45 46 46 /** 47 * Handle the Toolbar/BuddyBar business.47 * Toggle the display of the toolbar based on certain conditions. 48 48 * 49 49 * @since 1.2.0 50 50 */ 51 51 function bp_core_load_admin_bar() { 52 53 52 // Show the Toolbar for logged out users. 54 53 if ( ! is_user_logged_in() && (int) bp_get_option( 'hide-loggedout-adminbar' ) != 1 ) { … … 56 55 } 57 56 58 // Hide the WordPress Toolbar and show the BuddyBar.57 // Hide the WordPress Toolbar. 59 58 if ( ! bp_use_wp_admin_bar() ) { 60 _doing_it_wrong( __FUNCTION__, __( 'The BuddyBar is no longer supported. Please migrate to the WordPress toolbar as soon as possible.', 'buddypress' ), '2.1.0' );61 62 // Load deprecated code if not available.63 if ( ! function_exists( 'bp_core_admin_bar' ) ) {64 require buddypress()->plugin_dir . 'bp-core/deprecated/2.1.php';65 }66 67 59 // Keep the WP Toolbar from loading. 68 60 show_admin_bar( false ); 69 70 // Actions used to build the BP Toolbar.71 add_action( 'bp_adminbar_logo', 'bp_adminbar_logo' );72 add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 );73 add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu', 4 );74 add_action( 'bp_adminbar_menus', 'bp_adminbar_thisblog_menu', 6 );75 add_action( 'bp_adminbar_menus', 'bp_adminbar_random_menu', 100 );76 77 // Actions used to append BP Toolbar to footer.78 add_action( 'wp_footer', 'bp_core_admin_bar', 8 );79 add_action( 'admin_footer', 'bp_core_admin_bar' );80 61 } 81 62 }
Note: See TracChangeset
for help on using the changeset viewer.