Ticket #4959: ticket#4959.patch
File ticket#4959.patch, 1.7 KB (added by , 12 years ago) |
---|
-
bp-messages-template.php
317 317 return apply_filters( 'bp_get_message_thread_last_post_date', bp_format_time( strtotime( $messages_template->thread->last_message_date ) ) ); 318 318 } 319 319 320 function bp_message_thread_avatar( ) {321 echo bp_get_message_thread_avatar();320 function bp_message_thread_avatar( $args = '' ) { 321 echo apply_filters( 'bp_message_thread_avatar', bp_get_message_thread_avatar( $args ) ); 322 322 } 323 function bp_get_message_thread_avatar( ) {323 function bp_get_message_thread_avatar( $args = '' ) { 324 324 global $messages_template; 325 326 $fullname = bp_core_get_user_displayname( $messages_template->thread->last_sender_id ); 325 327 326 return apply_filters( 'bp_get_message_thread_avatar', bp_core_fetch_avatar( array( 'item_id' => $messages_template->thread->last_sender_id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $messages_template->thread->last_sender_id ) ) ) ) ); 328 $defaults = array( 329 'type' => 'thumb', 330 'width' => false, 331 'height' => false, 332 'class' => 'avatar', 333 'id' => false, 334 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $fullname ) 335 ); 336 337 $r = wp_parse_args( $args, $defaults ); 338 extract( $r, EXTR_SKIP ); 339 340 return apply_filters( 'bp_get_message_thread_avatar', bp_core_fetch_avatar( array( 'item_id' => $messages_template->thread->last_sender_id, 'type' => $type, 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height ) ) ); 327 341 } 328 342 329 343 function bp_total_unread_messages_count() {