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-groups/bp-groups-adminbar.php

    r5483 r5678  
    1818 */
    1919function 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;     
    2530    }
    2631}
Note: See TracChangeset for help on using the changeset viewer.