This filter can be used to change the user role in the comment form. This hook works for both registered users and guests.
Changelog
Since 7.0.0 version
Parameters
1. $role (type: string) - the role of the user
2. $comment (type: WP_Comment object) - the object of the comment
2. $comment (type: WP_Comment object) - the object of the comment
Usage
add_filter("wpdiscuz_author_title", function ($role, $comment) {
if ($comment->user_id == 1) {
$role = "Boss";
}
return $role;
}, 10, 2);
