Display user_role not bbp-author-role
-
Hi,
I attempted to create some new bbp roles using the code in the codex to copy the ‘participant’ role. Unfortunately this did not work for me despite deactivating all plugins (seems quite a few other people had the same issue).
Instead I am using User Role Editor to create a new forum role, which I have called ‘bosun’. Upon sign-up a new user is correctly assigned this role and has the capabilities of a participant, which is great, but their forum role is still displaying as ‘spectator’.
I would like to display the user’s role under the avatar.
One thing I can do is display:none the div class bbp-author-role and then add in a new div to display the user_role, which I think is what URE plugin generates.
I appreciate that some of this has to do with the URE plugin and that it is not supported here. What I am trying to understand is what I need to change in order to hide the bbp-author-role div and add in a new div calling the URE role. I can only find references to bbp-author-role in templates.php which is a function:
function bbp_topic_author_role( $args = array() ) { echo bbp_get_topic_author_role( $args ); } /** * Return the topic author role * * @since bbPress (r3860) * * @param array $args Optional. * @uses bbp_get_topic_id() To get the topic id * @uses bbp_get_user_display_role() To get the user display role * @uses bbp_get_topic_author_id() To get the topic author id * @uses apply_filters() Calls bbp_get_topic_author_role with the author * role & args * @return string topic author role */ function bbp_get_topic_author_role( $args = array() ) { // Parse arguments against default values $r = bbp_parse_args( $args, array( 'topic_id' => 0, 'class' => 'bbp-author-role', 'before' => '', 'after' => '' ), 'get_topic_author_role' ); $topic_id = bbp_get_topic_id( $r['topic_id'] ); $role = bbp_get_user_display_role( bbp_get_topic_author_id( $topic_id ) ); $author_role = sprintf( '%1$s<div class="%2$s">%3$s</div>%4$s', $r['before'], $r['class'], $role, $r['after'] ); return apply_filters( 'bbp_get_topic_author_role', $author_role, $r ); }
- You must be logged in to reply to this topic.