Changeset 11578 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 06/06/2017 05:46:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r11576 r11578 59 59 // User ID 60 60 // @todo displayed user for moderators that get this far? 61 $user_id = bp_ loggedin_user_id();61 $user_id = bp_displayed_user_id(); 62 62 63 63 // Search Terms. … … 305 305 * @param int $thread_id ID of the thread. 306 306 */ 307 return apply_filters( 'bp_get_message_thread_view_link', trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/view/' . $thread_id ), $thread_id );307 return apply_filters( 'bp_get_message_thread_view_link', trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/view/' . $thread_id ), $thread_id ); 308 308 } 309 309 … … 330 330 * @param string $value Text indicating action being executed. 331 331 */ 332 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) );332 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) ); 333 333 } 334 334 … … 362 362 363 363 // Base unread URL. 364 $url = trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/unread' );364 $url = trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/unread' ); 365 365 366 366 // Add the args to the URL. … … 409 409 410 410 // Base read URL. 411 $url = trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/read' );411 $url = trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/read' ); 412 412 413 413 // Add the args to the URL. … … 697 697 /** 698 698 * Output the unread messages count for the current inbox. 699 */ 700 function bp_total_unread_messages_count() { 701 echo bp_get_total_unread_messages_count(); 699 * 700 * @since 2.6.x Added $user_id argument. 701 * 702 * @param int $user_id The user ID. 703 * 704 * @return int $unread_count Total inbox unread count for user. 705 */ 706 function bp_total_unread_messages_count( $user_id = 0 ) { 707 echo bp_get_total_unread_messages_count( $user_id ); 702 708 } 703 709 /** 704 710 * Get the unread messages count for the current inbox. 705 711 * 706 * @return int 707 */ 708 function bp_get_total_unread_messages_count() { 712 * @since 2.6.x Added $user_id argument. 713 * 714 * @param int $user_id The user ID. 715 * 716 * @return int $unread_count Total inbox unread count for user. 717 */ 718 function bp_get_total_unread_messages_count( $user_id = 0 ) { 709 719 710 720 /** … … 715 725 * @param int $value Unread messages count for the current inbox. 716 726 */ 717 return apply_filters( 'bp_get_total_unread_messages_count', BP_Messages_Thread::get_inbox_count( ) );727 return apply_filters( 'bp_get_total_unread_messages_count', BP_Messages_Thread::get_inbox_count( $user_id ) ); 718 728 } 719 729 … … 825 835 * @param string $value The form action. 826 836 */ 827 return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );837 return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) ); 828 838 } 829 839 … … 1154 1164 * @param string $value Text indicating action being executed. 1155 1165 */ 1156 return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id, 'messages_delete_thread' ) );1166 return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id, 'messages_delete_thread' ) ); 1157 1167 } 1158 1168 … … 1172 1182 1173 1183 if ( 1 === (int) $messages_template->thread->is_active ) { 1174 $link = wp_nonce_url( trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' );1184 $link = wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' ); 1175 1185 } else { 1176 $link = wp_nonce_url( trailingslashit( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' );1186 $link = wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' ); 1177 1187 } 1178 1188 … … 1925 1935 * @param string $value Text indicating action being executed. 1926 1936 */ 1927 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( bp_ loggedin_user_domain() . bp_get_messages_slug() . '/inbox/delete/' . bp_get_the_thread_id(), 'messages_delete_thread' ) );1937 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( bp_displayed_user_domain() . bp_get_messages_slug() . '/inbox/delete/' . bp_get_the_thread_id(), 'messages_delete_thread' ) ); 1928 1938 } 1929 1939
Note: See TracChangeset
for help on using the changeset viewer.