- Timestamp:
- 03/27/2023 06:19:06 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-component.php
r13441 r13442 295 295 // Menus for logged in user. 296 296 if ( is_user_logged_in() ) { 297 298 // Setup the logged in user variables. 299 $messages_link = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ); 297 $message_slug = bp_get_messages_slug(); 298 $custom_message_slug = bp_rewrites_get_slug( 'members', 'member_' . $message_slug, $message_slug ); 300 299 301 300 // Unread message count. … … 322 321 'id' => 'my-account-' . $this->id, 323 322 'title' => $title, 324 'href' => $messages_link 323 'href' => bp_loggedin_user_url( 324 array( 325 'single_item_component' => $custom_message_slug, 326 ) 327 ), 325 328 ); 326 329 … … 330 333 'id' => 'my-account-' . $this->id . '-inbox', 331 334 'title' => $inbox, 332 'href' => trailingslashit( $messages_link . 'inbox' ), 333 'position' => 10 335 'href' => bp_loggedin_user_url( 336 array( 337 'single_item_component' => $custom_message_slug, 338 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_inbox', 'inbox' ), 339 ) 340 ), 341 'position' => 10, 334 342 ); 335 343 336 344 // Starred. 337 345 if ( bp_is_active( $this->id, 'star' ) ) { 346 $star_slug = bp_get_messages_starred_slug(); 338 347 $wp_admin_nav[] = array( 339 348 'parent' => 'my-account-' . $this->id, 340 349 'id' => 'my-account-' . $this->id . '-starred', 341 350 'title' => __( 'Starred', 'buddypress' ), 342 'href' => trailingslashit( $messages_link . bp_get_messages_starred_slug() ), 343 'position' => 11 351 'href' => bp_loggedin_user_url( 352 array( 353 'single_item_component' => $custom_message_slug, 354 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_' . $star_slug, $star_slug ), 355 ) 356 ), 357 'position' => 11, 344 358 ); 345 359 } … … 350 364 'id' => 'my-account-' . $this->id . '-sentbox', 351 365 'title' => __( 'Sent', 'buddypress' ), 352 'href' => trailingslashit( $messages_link . 'sentbox' ), 353 'position' => 20 366 'href' => bp_loggedin_user_url( 367 array( 368 'single_item_component' => $custom_message_slug, 369 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_sentbox', 'sentbox' ), 370 ) 371 ), 372 'position' => 20, 354 373 ); 355 374 … … 359 378 'id' => 'my-account-' . $this->id . '-compose', 360 379 'title' => __( 'Compose', 'buddypress' ), 361 'href' => trailingslashit( $messages_link . 'compose' ), 362 'position' => 30 380 'href' => bp_loggedin_user_url( 381 array( 382 'single_item_component' => $custom_message_slug, 383 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_compose', 'compose' ), 384 ) 385 ), 386 'position' => 30, 363 387 ); 364 388 … … 369 393 'id' => 'my-account-' . $this->id . '-notices', 370 394 'title' => __( 'Site Notices', 'buddypress' ), 371 'href' => trailingslashit( $messages_link . 'notices' ), 372 'position' => 90 395 'href' => bp_loggedin_user_url( 396 array( 397 'single_item_component' => $custom_message_slug, 398 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $message_slug . '_notices', 'notices' ), 399 ) 400 ), 401 'position' => 90, 373 402 ); 374 403 }
Note: See TracChangeset
for help on using the changeset viewer.