Skip to:
Content

BuddyPress.org

Changeset 6086


Ignore:
Timestamp:
06/13/2012 08:46:17 PM (11 years ago)
Author:
johnjamesjacoby
Message:

WP Version Check:

  • Fixes missing notifications menu.
  • Fixes missing groups menu.
  • Correctly compares floats as numbers.
  • Fix non-yoda comparisons.
  • Fixes #4255 (1.5 branch)
Location:
branches/1.5
Files:
4 edited

Legend:

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

    r5958 r6086  
    2121 */
    2222function bp_core_admin_bar_version_check() {
    23     if ( '3.2' == bp_get_major_wp_version() ) {
     23    if ( 3.2 == bp_get_major_wp_version() ) {
    2424        add_action( 'bp_setup_admin_bar', 'bp_admin_bar_root_site',       3 );
    2525        add_action( 'bp_setup_admin_bar', 'bp_admin_bar_comments_menu',   3 );
     
    4141function bp_admin_bar_remove_wp_menus() {
    4242
    43     if ( '3.2' == bp_get_major_wp_version() ) {
     43    if ( 3.2 == bp_get_major_wp_version() ) {
    4444        remove_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 );
    4545        remove_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 );
  • branches/1.5/bp-groups/bp-groups-adminbar.php

    r5958 r6086  
    5050        return false;
    5151
    52     if ( '3.2' == bp_get_major_wp_version() ) {
     52    if ( 3.2 == bp_get_major_wp_version() ) {
    5353
    5454        // Group avatar
     
    7272        ) );
    7373
    74     } elseif ( '3.3' == bp_get_major_wp_version() ) {
     74    } elseif ( 3.3 <= bp_get_major_wp_version() ) {
    7575       
    7676        // Unique ID for the 'My Account' menu
  • branches/1.5/bp-members/bp-members-adminbar.php

    r5678 r6086  
    5151    if ( is_user_logged_in() ) {
    5252
    53         if ( '3.2' == bp_get_major_wp_version() ) {
     53        if ( 3.2 == bp_get_major_wp_version() ) {
    5454
    5555            // User avatar
     
    126126        return false;
    127127
    128     if ( '3.2' == bp_get_major_wp_version() ) {
     128    if ( 3.2 == bp_get_major_wp_version() ) {
    129129
    130130        // User avatar
     
    146146        ) );
    147147
    148     } elseif ( '3.3' == bp_get_major_wp_version() ) {
     148    } elseif ( 3.3 <= bp_get_major_wp_version() ) {
    149149       
    150150        // Unique ID for the 'My Account' menu
     
    222222    }
    223223
    224     if ( '3.2' == bp_get_major_wp_version() ) {
     224    if ( 3.2 == bp_get_major_wp_version() ) {
    225225
    226226        // Add the top-level Notifications button
     
    231231        ) );
    232232
    233     } elseif ( '3.3' == bp_get_major_wp_version() ) {
     233    } elseif ( 3.3 == bp_get_major_wp_version() ) {
    234234       
    235235        // Add the top-level Notifications button
  • branches/1.5/bp-themes/bp-default/functions.php

    r5979 r6086  
    8484    // This theme allows users to set a custom background
    8585    // Backward-compatibility with WP < 3.4 will be removed in a future release
    86     if ( bp_get_major_wp_version() >= 3.4 ) {
     86    if ( 3.4 <= bp_get_major_wp_version() ) {
    8787        $custom_background_args = array(
    8888            'wp-head-callback' => 'bp_dtheme_custom_background_style'
     
    108108        // Add a way for the custom header to be styled in the admin panel that controls custom headers.
    109109        // Backward-compatibility with WP < 3.4 will be removed in a future release
    110         if ( bp_get_major_wp_version() >= 3.4 ) {
     110        if ( 3.4 <= bp_get_major_wp_version() ) {
    111111            $custom_header_args = array(
    112112                'wp-head-callback' => 'bp_dtheme_header_style',
Note: See TracChangeset for help on using the changeset viewer.