Changeset 13436 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 03/15/2023 08:16:46 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r13433 r13436 338 338 } 339 339 340 $domain = bp_members_get_user_url( $user_id ); 340 $url = bp_members_get_user_url( 341 $user_id, 342 array( 343 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_messages', bp_get_messages_slug() ), 344 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_messages_view', 'view' ), 345 'single_item_action_variables' => array( $thread_id ), 346 ) 347 ); 341 348 342 349 /** … … 347 354 * @since 2.9.0 Added the `$user_id` parameter. 348 355 * 349 * @param string $ valuePermalink of a particular thread.356 * @param string $url Permalink of a particular thread. 350 357 * @param int $thread_id ID of the thread. 351 358 * @param int $user_id ID of the user. 352 359 */ 353 return apply_filters( 'bp_get_message_thread_view_link', trailingslashit( $domain . bp_get_messages_slug() . '/view/' . $thread_id ), $thread_id, $user_id );360 return apply_filters( 'bp_get_message_thread_view_link', $url, $thread_id, $user_id ); 354 361 } 355 362 … … 383 390 } 384 391 385 $domain = bp_members_get_user_url( $user_id ); 392 $current_action_slug = bp_current_action(); 393 $current_action_rewrite_id = 'member_messages_' . $current_action_slug; 394 $action_variable_delete_slug = bp_rewrites_get_slug( 'members', $current_action_rewrite_id . '_delete', 'delete' ); 395 396 $url = bp_members_get_user_url( 397 $user_id, 398 array( 399 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_messages', bp_get_messages_slug() ), 400 'single_item_action' => bp_rewrites_get_slug( 'members', $current_action_rewrite_id, $current_action_slug ), 401 'single_item_action_variables' => array( $action_variable_delete_slug, $messages_template->thread->thread_id ), 402 ) 403 ); 386 404 387 405 /** … … 390 408 * @since 1.0.0 391 409 * 392 * @param string $ valueURL for deleting the current thread.410 * @param string $url URL for deleting the current thread. 393 411 * @param int $user_id ID of the user relative to whom the link should be generated. 394 412 */ 395 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( $domain . bp_get_messages_slug() . '/' . bp_current_action() . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ), $user_id );413 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( $url, 'messages_delete_thread' ), $user_id ); 396 414 } 397 415 … … 435 453 } 436 454 437 $domain = bp_members_get_user_url( $user_id ); 455 $current_action_slug = bp_current_action(); 456 $current_action_rewrite_id = 'member_messages_' . $current_action_slug; 457 $action_variable_unread_slug = bp_rewrites_get_slug( 'members', $current_action_rewrite_id . '_unread', 'unread' ); 438 458 439 459 // Base unread URL. 440 $url = trailingslashit( $domain . bp_get_messages_slug() . '/' . bp_current_action() . '/unread' ); 460 $url = bp_members_get_user_url( 461 $user_id, 462 array( 463 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_messages', bp_get_messages_slug() ), 464 'single_item_action' => bp_rewrites_get_slug( 'members', $current_action_rewrite_id, $current_action_slug ), 465 'single_item_action_variables' => array( $action_variable_unread_slug ), 466 ) 467 ); 441 468 442 469 // Add the args to the URL. … … 497 524 } 498 525 499 $domain = bp_members_get_user_url( $user_id ); 526 $current_action_slug = bp_current_action(); 527 $current_action_rewrite_id = 'member_messages_' . $current_action_slug; 528 $action_variable_read_slug = bp_rewrites_get_slug( 'members', $current_action_rewrite_id . '_read', 'read' ); 500 529 501 530 // Base read URL. 502 $url = trailingslashit( $domain . bp_get_messages_slug() . '/' . bp_current_action() . '/read' ); 531 $url = bp_members_get_user_url( 532 $user_id, 533 array( 534 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_messages', bp_get_messages_slug() ), 535 'single_item_action' => bp_rewrites_get_slug( 'members', $current_action_rewrite_id, $current_action_slug ), 536 'single_item_action_variables' => array( $action_variable_read_slug ), 537 ) 538 ); 503 539 504 540 // Add the args to the URL.
Note: See TracChangeset
for help on using the changeset viewer.