Changeset 6545 for trunk/bp-messages/bp-messages-screens.php
- Timestamp:
- 11/30/2012 11:42:31 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-screens.php
r6342 r6545 87 87 } 88 88 89 function messages_screen_conversation() { 90 91 // Bail if not viewing a single message 92 if ( !bp_is_messages_component() || !bp_is_current_action( 'view' ) ) 93 return false; 94 95 $thread_id = (int) bp_action_variable( 0 ); 96 97 if ( empty( $thread_id ) || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access( $thread_id ) && !bp_current_user_can( 'bp_moderate' ) ) ) 98 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) ); 99 100 // Load up BuddyPress one time 101 $bp = buddypress(); 102 103 // Decrease the unread count in the nav before it's rendered 104 $bp->bp_nav[$bp->messages->slug]['name'] = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() ); 105 106 do_action( 'messages_screen_conversation' ); 107 108 bp_core_load_template( apply_filters( 'messages_template_view_message', 'members/single/home' ) ); 109 } 110 add_action( 'bp_screens', 'messages_screen_conversation' ); 111 89 112 function messages_screen_notices() { 90 113 global $notice_id;
Note: See TracChangeset
for help on using the changeset viewer.