- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r13495 r13503 289 289 if ( is_user_logged_in() ) { 290 290 $profile_slug = bp_get_profile_slug(); 291 $path_chunks = array(292 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ),293 );294 291 295 292 // Add the "Profile" sub menu. … … 298 295 'id' => 'my-account-' . $this->id, 299 296 'title' => _x( 'Profile', 'My Account Profile', 'buddypress' ), 300 'href' => bp_loggedin_user_url( $path_chunks),297 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug ) ) ), 301 298 ); 302 303 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_public', 'public' );304 299 305 300 // View Profile. … … 308 303 'id' => 'my-account-' . $this->id . '-public', 309 304 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 310 'href' => bp_loggedin_user_url( $path_chunks),305 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug, 'public' ) ) ), 311 306 'position' => 10, 312 307 ); 313 314 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' );315 308 316 309 // Edit Profile. … … 319 312 'id' => 'my-account-' . $this->id . '-edit', 320 313 'title' => _x( 'Edit', 'My Account Profile sub nav', 'buddypress' ), 321 'href' => bp_loggedin_user_url( $path_chunks),314 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $profile_slug, 'edit' ) ) ), 322 315 'position' => 20, 323 316 ); … … 392 385 */ 393 386 public function setup_settings_admin_nav( $wp_admin_nav ) { 394 395 // Setup the logged in user variables.396 $settings_slug = bp_get_settings_slug();397 $path_chunks = array(398 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug ),399 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug . '_profile', 'profile' ),400 );401 402 387 // Add the "Profile" subnav item. 403 388 $wp_admin_nav[] = array( … … 405 390 'id' => 'my-account-' . buddypress()->settings->id . '-profile', 406 391 'title' => _x( 'Profile', 'My Account Settings sub nav', 'buddypress' ), 407 'href' => bp_loggedin_user_url( $path_chunks),392 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_settings_slug(), 'profile' ) ) ), 408 393 ); 409 394
Note: See TracChangeset
for help on using the changeset viewer.