Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2014 01:47:10 AM (6 years ago)
Author:
imath
Message:

Does not display change-avatar user nav and screens if WordPress Show avatars setting is disabled

If WordPress discussion Avatar display setting is not activated, then displaying change-avatar user nav and screens is not necessary and might confuse the user as his uploaded avatar will not display.

Fixes #5346

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-adminbar.php

    r7592 r7747  
    9393    ) );
    9494
    95     if( bp_is_active( 'xprofile' ) ) {
     95    if ( bp_is_active( 'xprofile' ) ) {
    9696        // User Admin > Edit this user's profile
    9797        $wp_admin_bar->add_menu( array(
     
    103103
    104104        // User Admin > Edit this user's avatar
    105         $wp_admin_bar->add_menu( array(
    106             'parent' => $bp->user_admin_menu_id,
    107             'id'     => $bp->user_admin_menu_id . '-change-avatar',
    108             'title'  => __( "Edit Avatar", 'buddypress' ),
    109             'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
    110         ) );
     105        if ( buddypress()->avatar->show_avatars ) {
     106            $wp_admin_bar->add_menu( array(
     107                'parent' => $bp->user_admin_menu_id,
     108                'id'     => $bp->user_admin_menu_id . '-change-avatar',
     109                'title'  => __( "Edit Avatar", 'buddypress' ),
     110                'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
     111            ) );
     112        }
     113
    111114    }
    112115
Note: See TracChangeset for help on using the changeset viewer.