- Timestamp:
- 03/27/2023 06:19:06 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13441 r13442 616 616 */ 617 617 public function get_avatar_cover_image_admin_navs( $admin_bar_menu_id = '' ) { 618 $wp_admin_nav = array(); 619 $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ); 618 $wp_admin_nav = array(); 619 $profile_slug = bp_get_profile_slug(); 620 $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ); 620 621 621 622 if ( ! $admin_bar_menu_id ) { … … 629 630 'id' => 'my-account-' . $admin_bar_menu_id . '-change-avatar', 630 631 'title' => _x( 'Change Profile Photo', 'My Account Profile sub nav', 'buddypress' ), 631 'href' => trailingslashit( $profile_link . 'change-avatar' ), 632 'position' => 30 632 'href' => bp_loggedin_user_url( 633 array( 634 'single_item_component' => $custom_profile_slug, 635 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_avatar', 'change-avatar' ), 636 ) 637 ), 638 'position' => 30, 633 639 ); 634 640 } … … 640 646 'id' => 'my-account-' . $admin_bar_menu_id . '-change-cover-image', 641 647 'title' => _x( 'Change Cover Image', 'My Account Profile sub nav', 'buddypress' ), 642 'href' => trailingslashit( $profile_link . 'change-cover-image' ), 643 'position' => 40 648 'href' => bp_loggedin_user_url( 649 array( 650 'single_item_component' => $custom_profile_slug, 651 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_cover_image', 'change-cover-image' ), 652 ) 653 ), 654 'position' => 40, 644 655 ); 645 }646 647 return $wp_admin_nav;648 }649 650 /**651 * Get the members invitations admin bar navs.652 *653 * @since 8.0.0654 *655 * @param string $admin_bar_menu_id The Admin bar menu ID to attach sub items to.656 * @return array The members invitations admin navs.657 */658 public function get_members_invitations_admin_navs( $admin_bar_menu_id = '' ) {659 $wp_admin_nav = array();660 $invite_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() );661 662 if ( ! $admin_bar_menu_id ) {663 $admin_bar_menu_id = $this->id;664 656 } 665 657 … … 677 669 // Menus for logged in user. 678 670 if ( is_user_logged_in() ) { 679 $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ); 671 $profile_slug = bp_get_profile_slug(); 672 $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ); 680 673 681 674 if ( ! bp_is_active( 'xprofile' ) ) { … … 685 678 'id' => 'my-account-' . $this->id, 686 679 'title' => _x( 'Profile', 'My Account Profile', 'buddypress' ), 687 'href' => $profile_link 680 'href' => bp_loggedin_user_url( 681 array( 682 'single_item_component' => $custom_profile_slug, 683 ) 684 ), 688 685 ); 689 686 … … 693 690 'id' => 'my-account-' . $this->id . '-public', 694 691 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 695 'href' => trailingslashit( $profile_link . 'public' ), 696 'position' => 10 692 'href' => bp_loggedin_user_url( 693 array( 694 'single_item_component' => $custom_profile_slug, 695 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' ), 696 ) 697 ), 698 'position' => 10, 697 699 ); 698 700
Note: See TracChangeset
for help on using the changeset viewer.