- Timestamp:
- 03/27/2023 06:19:06 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r13441 r13442 316 316 // Menus for logged in user. 317 317 if ( is_user_logged_in() ) { 318 319 // Profile link. 320 $profile_link = trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ); 318 $profile_slug = bp_get_profile_slug(); 319 $path_chunks = array( 320 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ), 321 ); 321 322 322 323 // Add the "Profile" sub menu. … … 325 326 'id' => 'my-account-' . $this->id, 326 327 'title' => _x( 'Profile', 'My Account Profile', 'buddypress' ), 327 'href' => $profile_link,328 'href' => bp_loggedin_user_url( $path_chunks ), 328 329 ); 330 331 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' ); 329 332 330 333 // View Profile. … … 333 336 'id' => 'my-account-' . $this->id . '-public', 334 337 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 335 'href' => trailingslashit( $profile_link . 'public'),338 'href' => bp_loggedin_user_url( $path_chunks ), 336 339 'position' => 10, 337 340 ); 341 342 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' ); 338 343 339 344 // Edit Profile. … … 342 347 'id' => 'my-account-' . $this->id . '-edit', 343 348 'title' => _x( 'Edit', 'My Account Profile sub nav', 'buddypress' ), 344 'href' => trailingslashit( $profile_link . 'edit'),349 'href' => bp_loggedin_user_url( $path_chunks ), 345 350 'position' => 20, 346 351 ); … … 417 422 418 423 // Setup the logged in user variables. 419 $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() ); 424 $settings_slug = bp_get_settings_slug(); 425 $path_chunks = array( 426 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug ), 427 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_profile', 'profile' ), 428 ); 420 429 421 430 // Add the "Profile" subnav item. … … 424 433 'id' => 'my-account-' . buddypress()->settings->id . '-profile', 425 434 'title' => _x( 'Profile', 'My Account Settings sub nav', 'buddypress' ), 426 'href' => trailingslashit( $settings_link . 'profile'),435 'href' => bp_loggedin_user_url( $path_chunks ), 427 436 ); 428 437
Note: See TracChangeset
for help on using the changeset viewer.