Changeset 5678
- Timestamp:
- 02/07/2012 02:16:37 AM (13 years ago)
- Location:
- branches/1.5
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/bp-core/bp-core-adminbar.php
r5628 r5678 66 66 * Add a menu for the root site of this BuddyPress network 67 67 * 68 * @global type $bp69 68 * @global type $wp_admin_bar 70 69 * @return If in ajax 71 70 */ 72 71 function bp_admin_bar_root_site() { 73 global $ bp, $wp_admin_bar;72 global $wp_admin_bar; 74 73 75 74 // Create the root blog menu … … 113 112 */ 114 113 function bp_admin_bar_my_sites_menu() { 115 global $wp db, $wp_admin_bar;114 global $wp_admin_bar; 116 115 117 116 /* Add the 'My Sites' menu if the user has more than one site. */ … … 217 216 218 217 $update_title = array( ); 219 if ( $wordpress_update_count)218 if ( !empty( $wordpress_update_count ) ) 220 219 $update_title[] = sprintf( __( '%d WordPress Update' ), $wordpress_update_count ); 221 220 if ( $plugin_update_count ) … … 237 236 */ 238 237 function bp_core_load_admin_bar_css() { 239 global $wp_version;240 238 241 239 if ( !bp_use_wp_admin_bar() ) -
branches/1.5/bp-core/bp-core-wpabstraction.php
r5481 r5678 23 23 global $wp_version; 24 24 25 return substr( $wp_version, 0, ( strpos( $wp_version, '.' ) + 2 ) );25 return (float) $wp_version; 26 26 } 27 27 -
branches/1.5/bp-groups/bp-groups-adminbar.php
r5483 r5678 18 18 */ 19 19 function bp_groups_admin_bar_version_check() { 20 if ( '3.2' == bp_get_major_wp_version() ) { 21 add_action( 'bp_setup_admin_bar', 'bp_groups_group_admin_menu', 99 ); 22 } elseif ( '3.3' == bp_get_major_wp_version() ) { 23 remove_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 ); 24 add_action( 'admin_bar_menu', 'bp_groups_group_admin_menu', 400 ); 20 switch( bp_get_major_wp_version() ) { 21 case 3.2 : 22 add_action( 'bp_setup_admin_bar', 'bp_groups_group_admin_menu', 99 ); 23 break; 24 case 3.3 : 25 case 3.4 : 26 default : 27 remove_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 ); 28 add_action( 'admin_bar_menu', 'bp_groups_group_admin_menu', 400 ); 29 break; 25 30 } 26 31 } -
branches/1.5/bp-members/bp-members-adminbar.php
r5483 r5678 18 18 */ 19 19 function bp_members_admin_bar_version_check() { 20 21 if ( '3.2' == bp_get_major_wp_version() ) { 22 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_menu', 4 ); 23 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_notifications_menu', 5 ); 24 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_user_admin_menu', 99 ); 25 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_logout', 9999 ); 26 } elseif ( '3.3' == bp_get_major_wp_version() ) { 27 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_menu', 4 ); 28 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_notifications_menu', 5 ); 29 add_action( 'admin_bar_menu', 'bp_members_admin_bar_user_admin_menu', 400 ); 20 switch( bp_get_major_wp_version() ) { 21 case 3.2 : 22 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_menu', 4 ); 23 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_notifications_menu', 5 ); 24 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_user_admin_menu', 99 ); 25 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_logout', 9999 ); 26 break; 27 case 3.3 : 28 case 3.4 : 29 default : 30 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_my_account_menu', 4 ); 31 add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_notifications_menu', 5 ); 32 add_action( 'admin_bar_menu', 'bp_members_admin_bar_user_admin_menu', 400 ); 33 break; 30 34 } 31 35 } … … 38 42 */ 39 43 function bp_members_admin_bar_my_account_menu() { 40 global $bp, $wp_admin_bar , $wp_version;44 global $bp, $wp_admin_bar; 41 45 42 46 // Bail if this is an ajax request
Note: See TracChangeset
for help on using the changeset viewer.