Changeset 5758 for trunk/bp-messages/bp-messages-template.php
- Timestamp:
- 02/13/2012 05:46:52 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-template.php
r5729 r5758 128 128 $this->thread = $this->next_thread(); 129 129 130 if ( 'notices' != $bp->current_action) {130 if ( ! bp_is_current_action( 'notices' ) ) { 131 131 $last_message_index = count( $this->thread->messages ) - 1; 132 132 $this->thread->messages = array_reverse( (array) $this->thread->messages ); … … 168 168 169 169 $defaults = array( 170 'user_id' => bp_loggedin_user_id(),171 'box' => 'inbox',170 'user_id' => bp_loggedin_user_id(), 171 'box' => 'inbox', 172 172 'per_page' => 10, 173 'max' => false,174 'type' => 'all'173 'max' => false, 174 'type' => 'all' 175 175 ); 176 176 … … 178 178 extract( $r, EXTR_SKIP ); 179 179 180 if ( 'notices' == $bp->current_action&& !bp_current_user_can( 'bp_moderate' ) ) {180 if ( bp_is_current_action( 'notices' ) && !bp_current_user_can( 'bp_moderate' ) ) { 181 181 wp_redirect( bp_displayed_user_id() ); 182 182 } else { 183 if ( 'inbox' == $bp->current_action )183 if ( bp_is_current_action( 'inbox' ) ) { 184 184 bp_core_delete_notifications_by_type( bp_loggedin_user_id(), $bp->messages->id, 'new_message' ); 185 186 if ( 'sentbox' == $bp->current_action ) 185 } 186 187 if ( bp_is_current_action( 'sentbox' ) ) 187 188 $box = 'sentbox'; 188 189 189 if ( 'notices' == $bp->current_action)190 if ( bp_is_current_action( 'notices' ) ) 190 191 $box = 'notices'; 191 192 … … 247 248 function bp_get_message_thread_to() { 248 249 global $messages_template; 249 return apply_filters( 'bp_message_thread_to', BP_Messages_Thread::get_recipient_links($messages_template->thread->recipients ) );250 return apply_filters( 'bp_message_thread_to', BP_Messages_Thread::get_recipient_links($messages_template->thread->recipients ) ); 250 251 } 251 252 … … 263 264 function bp_get_message_thread_delete_link() { 264 265 global $messages_template, $bp; 265 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/' . $bp->current_action. '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) );266 return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . $bp->messages->slug . '/' . bp_current_action() . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ) ); 266 267 } 267 268 … … 416 417 </select> 417 418 418 <?php if ( $bp->current_action != 'sentbox' && $bp->current_action != 'notices') : ?>419 <?php if ( ! bp_is_current_action( 'sentbox' ) && bp_is_current_action( 'notices' ) ) : ?> 419 420 420 421 <a href="#" id="mark_as_read"><?php _e('Mark as Read', 'buddypress') ?></a> … … 423 424 <?php endif; ?> 424 425 425 <a href="#" id="delete_<?php echo $bp->current_action ?>_messages"><?php _e('Delete Selected', 'buddypress')?></a> 426 <a href="#" id="delete_<?php echo bp_current_action(); ?>_messages"><?php _e( 'Delete Selected', 'buddypress' ); ?></a> 426 427 427 428 <?php
Note: See TracChangeset
for help on using the changeset viewer.