- Timestamp:
- 03/23/2023 07:35:38 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13437 r13441 429 429 $subnavs = array(); 430 430 431 $access = bp_core_can_edit_settings(); 432 $slug = bp_get_profile_slug(); 433 $profile_link = bp_get_members_component_link( buddypress()->profile->id ); 431 $access = bp_core_can_edit_settings(); 432 $slug = bp_get_profile_slug(); 434 433 435 434 // Change Avatar. … … 438 437 'name' => _x( 'Change Profile Photo', 'Profile header sub menu', 'buddypress' ), 439 438 'slug' => 'change-avatar', 440 'parent_url' => $profile_link,441 439 'parent_slug' => $slug, 442 440 'screen_function' => 'bp_members_screen_change_avatar', … … 451 449 'name' => _x( 'Change Cover Image', 'Profile header sub menu', 'buddypress' ), 452 450 'slug' => 'change-cover-image', 453 'parent_url' => $profile_link,454 451 'parent_slug' => $slug, 455 452 'screen_function' => 'bp_members_screen_change_cover_image', … … 486 483 if ( ! bp_displayed_user_has_front_template() && $is_xprofile_active ) { 487 484 add_action( 'bp_xprofile_setup_nav', array( $this, 'setup_xprofile_nav' ) ); 488 return;489 }490 491 // Determine user to use.492 if ( bp_displayed_user_domain() ) {493 $user_domain = bp_displayed_user_domain();494 } elseif ( bp_loggedin_user_domain() ) {495 $user_domain = bp_loggedin_user_domain();496 } else {497 485 return; 498 486 } … … 534 522 'name' => _x( 'View', 'Member profile view', 'buddypress' ), 535 523 'slug' => 'public', 536 'parent_url' => trailingslashit( $user_domain . $slug ),537 524 'parent_slug' => $slug, 538 525 'screen_function' => 'bp_members_screen_display_profile', … … 556 543 $front_subnav = $this->sub_nav; 557 544 $front_subnav['parent_slug'] = 'front'; 558 559 // In case the subnav is displayed in the front template560 $front_subnav['parent_url'] = trailingslashit( $user_domain . 'front' );561 545 562 546 // Set the subnav
Note: See TracChangeset
for help on using the changeset viewer.