Skip to:
Content

BuddyPress.org

Changeset 7592


Ignore:
Timestamp:
11/20/2013 09:20:39 PM (13 years ago)
Author:
r-a-y
Message:

Only show the 'Edit Profile' and 'Edit Avatar' adminbar items if the
xprofile component is active.

These links are dependent on the xprofile component being active.

Fixes #5253. Props imath.

File:
1 edited

Legend:

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

    r7521 r7592  
    9393        ) );
    9494
    95         // User Admin > Edit this user's profile
    96         $wp_admin_bar->add_menu( array(
    97                 'parent' => $bp->user_admin_menu_id,
    98                 'id'     => $bp->user_admin_menu_id . '-edit-profile',
    99                 'title'  => __( "Edit Profile", 'buddypress' ),
    100                 'href'   => bp_get_members_component_link( 'profile', 'edit' )
    101         ) );
     95        if( bp_is_active( 'xprofile' ) ) {
     96                // User Admin > Edit this user's profile
     97                $wp_admin_bar->add_menu( array(
     98                        'parent' => $bp->user_admin_menu_id,
     99                        'id'     => $bp->user_admin_menu_id . '-edit-profile',
     100                        'title'  => __( "Edit Profile", 'buddypress' ),
     101                        'href'   => bp_get_members_component_link( 'profile', 'edit' )
     102                ) );
    102103
    103         // User Admin > Edit this user's avatar
    104         $wp_admin_bar->add_menu( array(
    105                 'parent' => $bp->user_admin_menu_id,
    106                 'id'     => $bp->user_admin_menu_id . '-change-avatar',
    107                 'title'  => __( "Edit Avatar", 'buddypress' ),
    108                 'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
    109         ) );
    110 
     104                // 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                ) );
     111        }
    111112
    112113        if ( bp_is_active( 'settings' ) ) {
    113 
    114114                // User Admin > Spam/unspam
    115115                $wp_admin_bar->add_menu( array(
Note: See TracChangeset for help on using the changeset viewer.