Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2012 02:16:37 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Fix toolbar if running 1.5 branch on WordPress 3.3/3.4. See #3983 (1.5 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-members/bp-members-adminbar.php

    r5483 r5678  
    1818 */
    1919function 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;     
    3034    }
    3135}
     
    3842 */
    3943function bp_members_admin_bar_my_account_menu() {
    40     global $bp, $wp_admin_bar, $wp_version;
     44    global $bp, $wp_admin_bar;
    4145
    4246    // Bail if this is an ajax request
Note: See TracChangeset for help on using the changeset viewer.