Changeset 5212
- Timestamp:
- 10/06/2011 02:57:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-adminbar.php
r4976 r5212 26 26 function bp_admin_bar_remove_wp_menus() { 27 27 28 /** 29 * WP 3.2 hooks 30 */ 28 31 remove_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 ); 29 32 remove_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 ); 30 33 remove_action( 'admin_bar_menu', 'wp_admin_bar_dashboard_view_site_menu', 25 ); 34 remove_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 31 35 32 36 // Don't show the 'Edit Page' menu on BP pages … … 34 38 remove_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); 35 39 36 remove_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );37 remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 );38 39 40 if ( !is_network_admin() && !is_user_admin() ) { 40 41 remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); 41 42 remove_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); 42 } 43 44 remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 43 remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 44 } 45 46 /** 47 * WP 3.3+ 48 */ 49 remove_action( 'admin_bar_menu', 'wp_admin_bar_blog_front_menu', 30 ); 50 remove_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 51 52 // Menus specific to blog posts shouldn't show on BP pages 53 if ( !bp_is_blog_page() && !is_network_admin() && !is_admin() ) { 54 remove_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 50 ); 55 remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 ); 56 } 57 58 // Don't show the Updates menu on the front end 59 if ( !is_network_admin() && !is_admin() ) { 60 remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 40 ); 61 } 45 62 } 46 63 add_action( 'bp_init', 'bp_admin_bar_remove_wp_menus', 2 );
Note: See TracChangeset
for help on using the changeset viewer.