- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r13495 r13503 336 336 337 337 // Setup the logged in user variables. 338 $activity_slug = bp_get_activity_slug(); 339 $custom_activity_slug = bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug ); 338 $activity_slug = bp_get_activity_slug(); 340 339 341 340 // Unread message count. 342 341 if ( bp_activity_do_mentions() ) { 343 342 $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() ); 344 if ( ! empty( $count ) ) {343 if ( ! empty( $count ) ) { 345 344 $title = sprintf( 346 345 /* translators: %s: Unread mention count for the current user */ … … 358 357 'id' => 'my-account-' . $this->id, 359 358 'title' => _x( 'Activity', 'My Account Activity sub nav', 'buddypress' ), 360 'href' => bp_loggedin_user_url( 361 array( 362 'single_item_component' => $custom_activity_slug, 363 ) 364 ), 359 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug ) ) ), 365 360 ); 366 361 … … 370 365 'id' => 'my-account-' . $this->id . '-personal', 371 366 'title' => _x( 'Personal', 'My Account Activity sub nav', 'buddypress' ), 372 'href' => bp_loggedin_user_url( 373 array( 374 'single_item_component' => $custom_activity_slug, 375 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_just_me', 'just-me' ), 376 ) 377 ), 367 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, 'just-me' ) ) ), 378 368 'position' => 10, 379 369 ); … … 385 375 'id' => 'my-account-' . $this->id . '-mentions', 386 376 'title' => $title, 387 'href' => bp_loggedin_user_url( 388 array( 389 'single_item_component' => $custom_activity_slug, 390 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ), 391 ) 392 ), 377 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, 'mentions' ) ) ), 393 378 'position' => 20, 394 379 ); … … 401 386 'id' => 'my-account-' . $this->id . '-favorites', 402 387 'title' => _x( 'Favorites', 'My Account Activity sub nav', 'buddypress' ), 403 'href' => bp_loggedin_user_url( 404 array( 405 'single_item_component' => $custom_activity_slug, 406 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_favorites', 'favorites' ), 407 ) 408 ), 388 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, 'favorites' ) ) ), 409 389 'position' => 30, 410 390 ); … … 413 393 // Friends? 414 394 if ( bp_is_active( 'friends' ) ) { 415 $friends_slug = bp_get_friends_slug();416 395 $wp_admin_nav[] = array( 417 396 'parent' => 'my-account-' . $this->id, 418 397 'id' => 'my-account-' . $this->id . '-friends', 419 398 'title' => _x( 'Friends', 'My Account Activity sub nav', 'buddypress' ), 420 'href' => bp_loggedin_user_url( 421 array( 422 'single_item_component' => $custom_activity_slug, 423 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $friends_slug, $friends_slug ), 424 ) 425 ), 399 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, bp_get_friends_slug() ) ) ), 426 400 'position' => 40, 427 401 ); … … 430 404 // Groups? 431 405 if ( bp_is_active( 'groups' ) ) { 432 $groups_slug = bp_get_groups_slug();433 406 $wp_admin_nav[] = array( 434 407 'parent' => 'my-account-' . $this->id, 435 408 'id' => 'my-account-' . $this->id . '-groups', 436 409 'title' => _x( 'Groups', 'My Account Activity sub nav', 'buddypress' ), 437 'href' => bp_loggedin_user_url( 438 array( 439 'single_item_component' => $custom_activity_slug, 440 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_' . $groups_slug, $groups_slug ), 441 ) 442 ), 410 'href' => bp_loggedin_user_url( bp_members_get_path_chunks( array( $activity_slug, bp_get_groups_slug() ) ) ), 443 411 'position' => 50 444 412 );
Note: See TracChangeset
for help on using the changeset viewer.