Changeset 7747 for trunk/bp-xprofile/bp-xprofile-loader.php
- Timestamp:
- 01/21/2014 01:47:10 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-loader.php
r7510 r7747 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 ); … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.