Ticket #5346: 5346.01.diff
File 5346.01.diff, 2.9 KB (added by , 11 years ago) |
---|
-
bp-members/bp-members-adminbar.php
92 92 'href' => bp_displayed_user_domain() 93 93 ) ); 94 94 95 if ( bp_is_active( 'xprofile' ) ) {95 if ( bp_is_active( 'xprofile' ) ) { 96 96 // User Admin > Edit this user's profile 97 97 $wp_admin_bar->add_menu( array( 98 98 'parent' => $bp->user_admin_menu_id, … … 102 102 ) ); 103 103 104 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 ) ); 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 111 114 } 112 115 113 116 if ( bp_is_active( 'settings' ) ) { -
bp-xprofile/bp-xprofile-loader.php
200 200 ); 201 201 202 202 // Change Avatar 203 $sub_nav[] = array( 204 'name' => __( 'Change Avatar', 'buddypress' ), 205 'slug' => 'change-avatar', 206 'parent_url' => $profile_link, 207 'parent_slug' => $this->slug, 208 'screen_function' => 'xprofile_screen_change_avatar', 209 'position' => 30, 210 'user_has_access' => bp_core_can_edit_settings() 211 ); 203 if ( buddypress()->avatar->show_avatars ) { 204 $sub_nav[] = array( 205 'name' => __( 'Change Avatar', 'buddypress' ), 206 'slug' => 'change-avatar', 207 'parent_url' => $profile_link, 208 'parent_slug' => $this->slug, 209 'screen_function' => 'xprofile_screen_change_avatar', 210 'position' => 30, 211 'user_has_access' => bp_core_can_edit_settings() 212 ); 213 } 212 214 213 215 parent::setup_nav( $main_nav, $sub_nav ); 214 216 } … … 252 254 'href' => trailingslashit( $profile_link . 'edit' ) 253 255 ); 254 256 255 // Edit Profile 256 $wp_admin_nav[] = array( 257 'parent' => 'my-account-' . $this->id, 258 'id' => 'my-account-' . $this->id . '-change-avatar', 259 'title' => __( 'Change Avatar', 'buddypress' ), 260 'href' => trailingslashit( $profile_link . 'change-avatar' ) 261 ); 257 // Edit Avatar 258 if ( buddypress()->avatar->show_avatars ) { 259 $wp_admin_nav[] = array( 260 'parent' => 'my-account-' . $this->id, 261 'id' => 'my-account-' . $this->id . '-change-avatar', 262 'title' => __( 'Change Avatar', 'buddypress' ), 263 'href' => trailingslashit( $profile_link . 'change-avatar' ) 264 ); 265 } 262 266 263 267 } 264 268