- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13499 r13503 534 534 */ 535 535 public function get_avatar_cover_image_admin_navs( $admin_bar_menu_id = '' ) { 536 $wp_admin_nav = array(); 537 $profile_slug = bp_get_profile_slug(); 538 $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ); 536 $wp_admin_nav = array(); 537 $profile_slug = bp_get_profile_slug(); 539 538 540 539 if ( ! $admin_bar_menu_id ) { … … 548 547 'id' => 'my-account-' . $admin_bar_menu_id . '-change-avatar', 549 548 'title' => _x( 'Change Profile Photo', 'My Account Profile sub nav', 'buddypress' ), 550 'href' => bp_loggedin_user_url( 551 array( 552 'single_item_component' => $custom_profile_slug, 553 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_avatar', 'change-avatar' ), 554 ) 555 ), 549 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug, 'change-avatar' ) ) ), 556 550 'position' => 30, 557 551 ); … … 564 558 'id' => 'my-account-' . $admin_bar_menu_id . '-change-cover-image', 565 559 'title' => _x( 'Change Cover Image', 'My Account Profile sub nav', 'buddypress' ), 566 'href' => bp_loggedin_user_url( 567 array( 568 'single_item_component' => $custom_profile_slug, 569 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_change_cover_image', 'change-cover-image' ), 570 ) 571 ), 560 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug, 'change-cover-image' ) ) ), 572 561 'position' => 40, 573 562 ); … … 587 576 // Menus for logged in user. 588 577 if ( is_user_logged_in() ) { 589 $profile_slug = bp_get_profile_slug(); 590 $custom_profile_slug = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ); 578 $profile_slug = bp_get_profile_slug(); 591 579 592 580 if ( ! bp_is_active( 'xprofile' ) ) { … … 596 584 'id' => 'my-account-' . $this->id, 597 585 'title' => _x( 'Profile', 'My Account Profile', 'buddypress' ), 598 'href' => bp_loggedin_user_url( 599 array( 600 'single_item_component' => $custom_profile_slug, 601 ) 602 ), 586 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug ) ) ), 603 587 ); 604 588 … … 608 592 'id' => 'my-account-' . $this->id . '-public', 609 593 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 610 'href' => bp_loggedin_user_url( 611 array( 612 'single_item_component' => $custom_profile_slug, 613 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' ), 614 ) 615 ), 594 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug, 'public' ) ) ), 616 595 'position' => 10, 617 596 );
Note: See TracChangeset
for help on using the changeset viewer.