better_messages_rest_thread_item
REQUIREMENTS
To be able to implement this guide, you need to learn how to insert PHP snippets to your website.
You can find guide here: WP Beginner
This filter allows to filter thread item data returned by Better Messages rest api.
The changes will affect every part of Better Messages interface.
add_filter('better_messages_rest_thread_item', 'custom_thread_item', 20, 4 );
function custom_thread_item( $thread_item, $thread_id, $thread_type, $include_personal ){
// Put false to not show this thread in conversation list
//$thread_item['isHidden'] = false;
//$thread_item['threadInfo'] = "<span>custom info</span>";
// Overwrite subject
//$thread_item['subject'] = html_entity_decode('Overwrite subject');
// Overwrite title
//$thread_item['title'] = html_entity_decode('Overwrite title');
// Overwrite url
//$thread_item['url'] = 'https://www.wordplus.org/groups/wordplus-users/';
// Overwrite image if applicable
//$thread_item['img'] = 'https://www.wordplus.org/wp-content/uploads/group-avatars/1/60897d5f10593-bpfull.png';
return $thread_item;
}