2017-07-26 42 views

回答

0

請參閱下面的解決方案,這我用在收件箱循環。

<?php 
// check message is reply and read     
$thread = new BP_Messages_Thread(bp_get_message_thread_id()); 
$user = wp_get_current_user(); 

foreach ($thread->sender_ids as $key => $value) { 
    if ($value != $user->ID) { 
     $recipient_id = $value; 
    }        
} 

if ($thread->last_sender_id == $user->ID) { 

    if($thread->recipients[$recipient_id]->unread_count > 0){ 
     echo('<i class="fa fa-reply" aria-hidden="true"></i>'); 
    }else{ 
     echo('<i class="fa fa-check" aria-hidden="true"></i>'); 
    } 
} 
?> 
相關問題