add_filter ('bbp_get_topic_class', 'rew_author_current' , 100 , 3) ;
add_filter ('bbp_get_reply_class', 'rew_author_current' , 100 , 3) ;
function rew_author_current ($post_classes, $topic_id, $classes) {
$author_id = bbp_get_topic_author_id( $topic_id );
$current_id = get_current_user_id() ;
if ($author_id == $current_id) {
$post_classes[] = 'rew-current-user' ;
$post_classes = array_merge( (array) $post_classes);
}
return $post_classes ;
}
will give you ‘rew-current-user’ as a style to add css
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets