Changeset 5678 for branches/1.5/bp-members/bp-members-adminbar.php
- Timestamp:
- 02/07/2012 02:16:37 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.